Blocking read on pipes

Jeff Epler jepler at unpythonic.net
Fri Jul 16 00:58:09 CEST 2004


Python's file.read() corresponds most closely to C's fread(3).
Python's os.read() corresponds most closely to POSIX's read(2).

Maybe you want
    os.read(0, 256)
instead of 
    sys.stdin.read(256)

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20040715/dd29af84/attachment.sig>


More information about the Python-list mailing list