[python-win32] message queueing between processes
Tim Roberts
timr at probo.com
Mon Feb 18 18:52:57 CET 2008
Sagar Khushalani wrote:
> i have 5 processes. out of these, i need 1 to start a queue that can
> be shared between the other 4. 2 of them will add messages to the
> queue and 2 will read and remove off of it. any ideas? i'm a little
> confused how to share the queue between them.
The Python "Queue" module is designed for communicating between threads
of a single process. It relies on a common memory space.
For interprocess communication, you'll need to use a different scheme.
On Windows, you can try to use a named pipe or a mailslot, or even spawn
a message loop and exchange window messages. Or, you could take a
cross-platform approach and use sockets.
You might try to Google for "python ipc"; I found a couple of good hits
in the first couple of pages.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list