popen2 on Windows

Bill Tutt billtut at microsoft.com
Mon Jul 5 19:08:38 EDT 1999


> From: John van der Koijk [mailto:vdkoijk at linux01.prc.tno.nl]

> After coping with my initial frustration, I've decided to make an
> unthreaded stub program talking to the DDE client, using popen2 to do
> the IPC with the GUI and controller program. Sadly, this approach also
> does not seem to work, because using popen2 gives me:
> 
> [....] os.fork()
> AttributeError: fork
> 
> This is amazing, since the manual for 1.5.2 says:
> 
> 8.13 popen2 -- Subprocesses with accessible standard I/O streams
> 
>    Availability: Unix, Windows.
> 

Well, its wrong. :) Windows doesn't have fork().
The win32pipe module exposes popen2() that does what you want it to do,
however you need to avoid a bug in Win9x. The knowledge base article at:
http://support.microsoft.com/support/kb/articles/q150/9/56.asp
covers what you need to do to avoid this dilemma.

Bill






More information about the Python-list mailing list