Solved: popen3 on win32 python:2.1.2

Thomas Guettler newsgroups at thomas-guettler.de
Sun Mar 10 17:53:04 EST 2002


> Hi!
> 
> popen3() hangs on W2K:
> 
> (stdin, stdout, stderr)=popen3('wvWare -x wvware.xml foo.doc')
> text=stdout.read()
> 


If there is a lot of output on e.g. stderr and you start reading
from stdin you have a deadlock

Example:

The subprocess writes a lot of data to stderr and blocks.
In your application you use:

(stdin, stdout, stderr)=popen3("command_with_a_lot_of_output")
stout.read()

--> Deadlock

Explanation:
http://mail.python.org/pipermail/python-dev/2000-September/009460.html

thomas




More information about the Python-list mailing list