[Pythonmac-SIG] os.pipe()

Jack Jansen jack@oratrix.nl
Thu, 19 Jul 2001 11:20:16 +0200


> I use a module which uses os.pipe(). Its not available on the Mac for some
> reason. The library file just describes it as creating a pipe and returning
> two file descriptor for reading and writing. Any idea what to do on the Mac?
> Is it simply two handles to two files?

A pipe is an operating system construct, and one that MacOS (9 or earlier) 
doesn't have, so that's what MacPython doesn't have it.

If you haven't seen pipes before they're probably best visualised as a serial 
line, but going between two processes on the same machine in stead of between 
two machines.

Pipes can sometimes be simulated by letting the first process write a file, 
and then reading it by the second process after the first one terminates. 
Another (often better) option is to use sockets.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm