[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: POpen3/POpen4 on Win32

From: Bill Tutt <rassilon_at_lyra.org>
Date: 2002-01-23 17:52:28 CET

> From: cmpilato@collab.net [mailto:cmpilato@collab.net]
>
> Hrm...bother. For some reason I seem to recall that our Python tests
> won't run under Windows right now anyway, but certainly we should do
> all we can to enforce that brokenness.
>
> And here's a quote from the Python online docs to support your claim:
>
> The only way to control the input and output streams and also
> retrieve the return codes is to use the Popen3 and Popen4 classes
> from the popen2 module; there are only available on Unix.
>

Well, yes that's true with the popen2 module and the Popen3 and Popen4
classes, but close() on the file object returned from the Win32
os.popen*() variants should always return the exit code of the child
process.

The docs appear to be incorrect.
(http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/dist/src/M
odules/posixmodule.c?rev=HEAD&content-type=text/vnd.viewcvs-markup)

Additionally, I'm not quite sure why nobody tried to get the Popen3 and
Popen4 classes working with Win32, it's not like it's all that hard to
modify the Win32 popen code in Python in order to provide a suitable C
extension interface to provide the appropriate behavior. (and that's not
just because I wrote the code it's derived from)

Do our test cases need poll() on POpen3/POpen4, or is just retrieving
the exit code good enough? If we need something more flexible like
POpen3/POpen4, maybe I can code up a Python version of the code that
does the required footwork on Win32.

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:58 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.