reading from pipe

Lutz Horn lutz.horn at fastmail.fm
Mon Jan 25 06:06:18 EST 2010


Hi,

Richard Lamboj schrieb:
> is there any solution to catch if a pipe has closed? Maybe the signal modul?

Since sys.stdin is a file object, you can use sys.stdin.closed to check
if it has been closed.

Lutz



More information about the Python-list mailing list