Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Communication between remote scripts

Reply
Thread Tools

Communication between remote scripts

 
 
ChrisH
Guest
Posts: n/a
 
      09-14-2004
I have a python script (A) that monitors a process (3rd party) on the
local machine (Windows).

I would like to create a second program on a remote Windows computer
that receives an update from program A periodically (maybe every 10
minutes or so), and tells it everything is running without a problem.

Can anyone recommend a good (and preferably simple) way for two programs
to communicate on a network?

 
Reply With Quote
 
 
 
 
ChrisH
Guest
Posts: n/a
 
      09-14-2004
Am I correct in saying that remote objects are not really needed for
this?


In article <>,
says...
> I have a python script (A) that monitors a process (3rd party) on the
> local machine (Windows).
>
> I would like to create a second program on a remote Windows computer
> that receives an update from program A periodically (maybe every 10
> minutes or so), and tells it everything is running without a problem.
>
> Can anyone recommend a good (and preferably simple) way for two programs
> to communicate on a network?
>
>

 
Reply With Quote
 
 
 
 
Rene Pijlman
Guest
Posts: n/a
 
      09-14-2004
ChrisH:
>Can anyone recommend a good (and preferably simple) way for two programs
>to communicate on a network?


TCP/IP / sockets:
http://www.amk.ca/python/howto/sockets/

--
René Pijlman
 
Reply With Quote
 
Irmen de Jong
Guest
Posts: n/a
 
      09-14-2004
ChrisH wrote:
> Am I correct in saying that remote objects are not really needed for
> this?

[...]
>>I would like to create a second program on a remote Windows computer
>>that receives an update from program A periodically (maybe every 10
>>minutes or so), and tells it everything is running without a problem.
>>
>>Can anyone recommend a good (and preferably simple) way for two programs
>>to communicate on a network?


Perhaps remote objects are a bit overkill for your specific problem.
But then again, Pyro for instance (pyro.sf.net) essentially removes
the need for any network code in your app, and takes care of various
other nasty things that happen at the network level.
So unless you choose to use Pyro or some other high level API,
you will have to deal with all this yourself-- and that may be
more work than you think...

--Irmen
>>

 
Reply With Quote
 
ChrisH
Guest
Posts: n/a
 
      09-14-2004
Thanks for the info. I've actually been looking at Pyro as a possible
solution. In some ways however, it seems a lot more powerful than what I
need for this project.

Could you give a simple example of how a two programs can "talk" to one
another? I don't think I really need RPCs in this case.

In article <41471f73$0$10528$>, irmen@-NOSPAM-
REMOVETHIS-xs4all.nl says...
> ChrisH wrote:
> > Am I correct in saying that remote objects are not really needed for
> > this?

> [...]
> >>I would like to create a second program on a remote Windows computer
> >>that receives an update from program A periodically (maybe every 10
> >>minutes or so), and tells it everything is running without a problem.
> >>
> >>Can anyone recommend a good (and preferably simple) way for two programs
> >>to communicate on a network?

>
> Perhaps remote objects are a bit overkill for your specific problem.
> But then again, Pyro for instance (pyro.sf.net) essentially removes
> the need for any network code in your app, and takes care of various
> other nasty things that happen at the network level.
> So unless you choose to use Pyro or some other high level API,
> you will have to deal with all this yourself-- and that may be
> more work than you think...
>
> --Irmen
> >>

>

 
Reply With Quote
 
Irmen de Jong
Guest
Posts: n/a
 
      09-14-2004
ChrisH wrote:

> Thanks for the info. I've actually been looking at Pyro as a possible
> solution. In some ways however, it seems a lot more powerful than what I
> need for this project.
>
> Could you give a simple example of how a two programs can "talk" to one
> another? I don't think I really need RPCs in this case.


Well if you don't want (or need) Pyro or another high-level RPC mechanism,
you have to decide on something else. TCP or UDP socket communication
is an option. See Tim Golden's reply.

The Python source distribution contains some small socket examples
(in Demo/sockets/).

--Irmen
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Communication across Perl scripts Jean Perl Misc 18 10-14-2010 02:53 PM
Stupid question: Making scripts python-scripts Jan Danielsson Python 8 07-22-2005 12:20 AM
Communication between python scripts Chris Python 9 03-04-2005 08:52 PM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM
RE: Communication between remote scripts Tim Golden Python 1 09-14-2004 09:08 PM



Advertisments