Python 2.2.1: os.popen() bug?

Carsten Gaebler clpy at snakefarm.org
Mon May 27 07:19:33 EDT 2002


Hi there!

If I write to a pipe that was opened read-only, python throws an
exception, but then the interpreter hangs instead of exiting. Is this
beavior expected or a bug? Consider this example on Linux:

#! /usr/bin/python

import os

pipe = os.popen("mail -s Test foo at bar.org")
print >> pipe, "Test"  # Raises IOError.
pipe.close()           # Never reached.


Regards,
Carsten.



More information about the Python-list mailing list