FIFO in python?

Donn Cave donn at u.washington.edu
Tue Dec 19 14:20:29 EST 2000


Quoth David Lees <DavidL at NOraqiaSPAMMY.com>:
| I am trying to learn how to use FIFO and am unable to open a fifo under
| Linux RedHat 6.2.  I hang on the open (open(fn,'rw'), even though I have
| done a successful check for file existence (os.path.exists(fn)).  The
| same code works under NT.  Any thoughts on what is going on?

>From what I can tell, "rw" does not have any defined meaning in
open().  Try "r+" for read/write.

Read-only open blocks on a fifo, waiting for a write.  I'm kind
of surprised myself, would have expect the read() to block.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list