popen hangs until closed

Mike Müller mmueller at dgfz.de
Fri Sep 1 11:37:28 CEST 2000

I try to run a command application in the background giving it a nicer GUI
I tested several methods on Win98 and NT:


but the result is always the same.

As long as don't call popen.close() it hangs. After the close() all my
commands I piped in are processed at once and the output is written to
stdout (popen) or the appropriate pipes (popen2 and popen3).
Seems like the in-pipe does not write to the application immediately but
waits for the close(). If  I wait between sending commands the execution
time of commands in the application is the same for all of them (= time I
called close()).

Since I want to run my background application interactively the batch like
mode described above does not help.

Is there any way to fix this from Python or is it a problem of the
application not supporting pipes properly?


More information about the Python-list mailing list