subprocess.Popen question

Chris Rebert clp2 at rebertia.com
Tue Aug 16 09:07:46 CEST 2011


On Tue, Aug 16, 2011 at 12:03 AM, Danny Wong (dannwong)
<dannwong at cisco.com> wrote:
> Hi All,
>        I'm executing a command which I want to capture the
> standard/stderr output into a file (which I have with the code below),
> but I also want the standard output to go into a variable so I can
> process the information for the next command. Any ideas? Thanks.

Pipe it thru `tee`:
http://en.wikipedia.org/wiki/Tee_%28command%29

Cheers,
Chris



More information about the Python-list mailing list