Process intercommunication

Grzegorz Dostatni grzegorz at
Mon Nov 5 14:29:30 CET 2001

For interprocess communications You have a couple of options. If A can
start B at a proper time You could solve Your problem with pipes. (using
popen I believe). If B is started differently, You could look into
signals to catch A's attention.  The easisest thing though it so make A a
server and make B connect on a given port.
An example of a server and a client is at:

It is quite possible to have a client and a server on the same machine. If
You're not going to have more than 10 processes trying to access Your
server (at a time) I'd recommend using the threading module to make things
a bit easier on Yourself. (watch out for mutual exclusion though ;-) ).

A reading list (assuming You'd like to go with sockets) (socket module) (thread module) (threading

The last one is a higher level  version of the second one.

Hope this helps.

More information about the Python-list mailing list