Python 2.0 - win32pipe routines inclusion for Windows

David Bolen db3l at fitlinxx.com
Thu Jul 27 01:32:52 EDT 2000


Guido van Rossum <guido at python.org> writes:

> It was discovered that the win32pipe module returned the file objects
> in the order (stdin, stdout, stderr) while popen2 returned them in the
> order (stdout, stdin, stderr).  The latter is clearly strange, so we
> decided that the new code should return (stdin, stdout, stderr).

Great - I was hoping that's the way it would turn out.  It happens to
also work out nicely for some exit code processing changes of mine on
the Windows side, since the os.popen#() routines can standardize on
using the first (or only for the original os.popen) file for returning
the exit code on the close, and since that's always stdin of the child
(except for the pair of os.popen() write modes, for which there's no
connection to the child stdin) it minimizes the risk of any deadlock
waiting for the child process during the close since the wait is
performed as part of closing stdin to the child process.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list