Bidrectional Subprocess Communication

Gabriel Genellina gagsl-py2 at
Tue Dec 16 01:08:18 CET 2008

En Sun, 14 Dec 2008 06:03:26 -0200, greg <greg at>  
> Gabriel Genellina wrote:
>> (Pipes don't work the same as sockets, although unix-like systems try  
>> hard  to hide the differences...)
> BSD-based unixes implement pipes using socketpair(), so
> pipes actually *are* sockets (or at least they used to be,
> not sure whether it's still true).

But not on Linux; a visible difference is that pipes are half-duplex on  
Linux (it seems that's enough for POSIX). I don't know for sure how  
they're implemented on Windows but they seem to be file system objects  
(they use functions like CreateFile, ReadFile, WriteFile, etc.)

Gabriel Genellina

More information about the Python-list mailing list