How to capture output of os.spawnv()?

Carel Fellinger cfelling at iae.nl
Thu Feb 14 22:52:46 CET 2002


Donn Cave <donn at u.washington.edu> wrote:
> Quoth Carel Fellinger <cfelling at iae.nl>:
...
> | I've reread the fine manuals, but can't find a clue hinting at this
> | interesting behaviour.

> I guess I should read the manuals some time.  I wonder if they explain
> why os.popen2 reverses the order of popen2.popen2's returns.

It says that os.popen2 uses a more intuitive order and especially for
popen3 this is true.  Compare

  popen2.popen3  ->  (child_stdout, child_stdin, child_stderr)

  os.popen3      ->  (child_stdin, child_stdout, child_stderr)

Besides in the os.popen* case the index in the result tuple reflexes
the unix file handle better.
-- 
groetjes, carel



More information about the Python-list mailing list