newbie question - executing system commands

Ignacio Vazquez-Abrams ignacio at openservices.net
Tue Sep 4 19:54:51 CEST 2001


On 4 Sep 2001, Donn Cave wrote:

> You can look, but unless you made special provisions for it in aCmdLine,
> you won't find them.  On UNIX, diagnostic and error output will go to a
> separate output stream, probably already open on the tty.  If you want
> them in the popen pipe (and you probably don't want them!), you can
> probably get them with a "2>&1" in the command line - that reopens the
> diagnostic output on the same stream as standard output, which has already
> been opened on the popen pipe.  (1 == standard output, 2 == error output,
> >& == dup2().)
>
> 	Donn Cave, donn at u.washington.edu

Ugh. If you're going to do that, then you're probably better using
os.popen4().

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list