Process to process synchronization (unix)
eric.brunel at pragmadev.com
Mon Mar 18 12:16:55 CET 2002
> I have a Zope application and another running process (in python too).
> I need to transmit data and signal (hey ! data available, do your job !)
> in an asynchronous way from the Zope app (in an external method) to the
> python running process (that runs for another user).
> The other process waits for the signal, takes given data, does the jobs
> and waits further signal (...)
> I'm 99.9% newbie in process to process communication.
> What packages are helpful for this ?
The two means that come to my mind are:
- named pipes: quite easy to handle, as they are manipulated just like
files. The problems are that named pipes are quite difficult to synchronize
if both processes should send data to the other, and that's it's a
Unix-only solution. All functions manipulating named pipes are built-ins or
in module os. If you choose that, I may also provide a few simple examples.
- sockets: a bit trickier to handle, but far more practical for two-way
communications and multi-platform. The Python module to handle them is
simply socket. There's an example in the library reference (see
- eric -
More information about the Python-list