subprocess and non-blocking IO (again)

Thomas Bellman bellman at lysator.liu.se
Tue Oct 11 17:22:04 CEST 2005


Marc Carter <mcarter at uk.ibm.com> writes:

> The problem with the above is that the subprocess buffers all its output 
> when used like this and, hence, this automation is not informing me of 
> much :)

You may want to take a look at my asyncproc module.  With it, you
can start subprocesses and let them run in the background without
blocking either the subprocess or your own process, while still
collecting their output.

You can download it from

    http://www.lysator.liu.se/~bellman/download/asyncproc.py

I suspect that it doesn't work under MS Windows, but I don't use
that OS, and thus can't test it.


-- 
Thomas Bellman,   Lysator Computer Club,   Linköping University,  Sweden
"Beware of bugs in the above code; I have    !  bellman @ lysator.liu.se
 only proved it correct, not tried it."      !  Make Love -- Nicht Wahr!




More information about the Python-list mailing list