Getting both PID and output from a command

Hugh Macdonald HughMacdonald at brokenpipefilms.com
Fri Mar 19 16:23:27 EST 2004


----- Original Message ----- 
From: "Stewart Midwinter" <stewart at midwinter.ca>
Subject: Re: Getting both PID and output from a command


> 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.

I'll take a look - thanks....


Hugh Macdonald





More information about the Python-list mailing list