Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #11516

Re: subprocess.Popen question

References <4E49AB3E.9000801@web.de> <D59C59453D0EDC43832490B6DADFAECF04401A5B@XMB-RCD-214.cisco.com>
Date 2011-08-16 00:07 -0700
Subject Re: subprocess.Popen question
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.40.1313478470.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Aug 16, 2011 at 12:03 AM, Danny Wong (dannwong)
<dannwong@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: subprocess.Popen question Chris Rebert <clp2@rebertia.com> - 2011-08-16 00:07 -0700

csiph-web