reading shell output in parallel

Ben Last ben at benlast.com
Sun Aug 15 04:14:18 EDT 2004


At the risk of blowing my own trumpet (a practise to be deplored), you might
like to have a play with Quasi (http://quasi-shell.sourceforge.net) in which
one can easily do:
 myFiles = `os ls *.py`
and the like, to get the output of Linux/cygwin/Windows-cmd processes.

At the moment, the output is not sent in parallel (execution completes
first), but you can do:
 for line in `os myCommand`:
   print line
   sendToServer(line)

...so that at least you see the lines as they're sent.

regards
ben




More information about the Python-list mailing list