os.popen command working differently on Windows

Nobody nobody at nowhere.com
Fri May 13 04:48:52 EDT 2011


On Thu, 12 May 2011 15:21:41 +0100, Tim Golden wrote:

> os.popen returns a file-like object from which you can read any error
> messages generated.

The documentation doesn't say, but if it's anything like the Unix popen()
function, with mode='r' the returned file-like object will correspond to
the child's stdout, but error messages will normally be written to stderr.

In any case, os.popen() and similar are deprecated in favour of
subprocess.Popen().




More information about the Python-list mailing list