[Python 2.4/2.5] subprocess module is sorely deficient?

Christian Heimes lists at cheimes.de
Tue Apr 22 16:55:14 EDT 2008


Nick Craig-Wood schrieb:
> Nothing apart from the fact it doesn't work on windows.  The buffering
> will cause you grief too.  If you want to do this properly under unix
> use pexpect not subprocess.
> 
>   http://www.noah.org/wiki/Pexpect
> 
> Proper non blocking IO is an absolute nightmare under Windows in my
> experience!  It really isn't the Windows way so you are fighting the
> system the whole time.

Nick is correct. The subproces tries to work around the issues with
threads. But it's no more than an ugly workaround fir Windows' short
comings on async file IO. It's a shame Windows implements the select()
syscall in wsock32 and limits its usage to sockets.

By the way I'm willing to dedicate some time to help enhancing the
subprocess. Everybody is invited to submit patches and I'll review and
check them into the trunk and py3k ASAP. Any help is appreciated:
enhancements for async IO, doc updates, more examples ...

Christian
Python core developer




More information about the Python-list mailing list