What IPC accessible from Python

Cameron Laird claird at starbase.neosoft.com
Mon Feb 19 09:17:48 EST 2001


In article <kuhf1sszf1.fsf at lasipalatsi.fi>,
Erno Kuusela  <erno-news at erno.iki.fi> wrote:
>In article
><Pine.A41.3.96.1010218101440.21000A-100000 at aix2.uottawa.ca>,
><abouf066 at aix2.uottawa.ca> writes:
>
>| Greetings, 
>| 	I need to spawn a process within a python application and I need
>| to have some communication between the child and the parent. Sockets are
>| 'sort of heavy' for my application. I was thinking to use a shared memory
>| or a pipe but I did not find any documentation (example) to understand how
>| this would be used.
>
>os.pipe() works just like pipe(2) in the unix c syscall api.
>
>no sysv shared memory (at least in the standard library, there
>may be 3rd party modules), but the mmap shared memory may work
>(with the mmap module in python >= 2.0).
>
>shared memory feels a lot heavier than pipes or unix domain sockets to
>me...
>
>  -- erno

Seconded.  That is, shared memory had it all over
sockets ten years ago, but a lot of work has been
done since then to improve implementations, and
socket programming is what I generally recommend
nowadays.  There are even stacks that use shmem
for loopback.

There's nothing particularly wrong with shmem; it's
just not exposed or exercised as it once was.
-- 

Cameron Laird <claird at NeoSoft.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list