Getting both PID and output from a command

Stewart Midwinter stewart at midwinter.ca
Fri Mar 19 16:09:39 EST 2004


hugh at brokenpipefilms.com (Hugh Macdonald) wrote in message news:<3cc4824d.0403190259.1e06a578 at posting.google.com>...
> I'm calling a command from within a python script and I need to be
> able to both catch the output (stdout and stderr) from it and also
> have the PID (so that I can kill it)

Take a look in PyPi for popen5.  It may do what you want, but only in
Linux: the Windows version isn't complete yet.

S



More information about the Python-list mailing list