Standard IPC for Python?

sturlamolden sturlamolden at
Wed Jan 14 11:59:22 CET 2009

On Jan 13, 5:25 pm, Laszlo Nagy <gand... at> wrote:

> I would like to develop some module for Python for IPC. Socket
> programming howto recommends that for local communication, and I
> personally experienced problems with TCP (see my previous post: "Slow
> network").

There are plenty of different IPC mechanisms available in

> I was looking for semaphores and shared memory, but it is not in the
> standard lib.

Take a look at:

- multiprocessing.Array and multiprocessing.Value

- mmap.mmap with 0 or -1 as the first argument (Windows and Linux,

- pywin32 on Windows (not standard lib)

> I was also thinking about unix domain sockets, but it is
> not available under windows.

Unix domain sockets are called 'named pipes' under Windows. Look for
it in multiprocessing or pywin32.

> The question is: what is the standard way to implement fast and portable
> IPC with Python?

form multiprocessing import Queue

More information about the Python-list mailing list