Correctly reading stdout/stderr from subprocess

Maric Michaud maric at
Thu Jun 15 10:37:18 CEST 2006

Le Mercredi 14 Juin 2006 19:56, Christoph Haas a écrit :
> Quite interesting. I dived into /usr/lib/python2.4/ and
> found out that the "communicate()" method actually works similarly. I
> might even prefer your version 

You should'nt IMO, the former 'run2' was quite short compared to this one. 
Also Popen.communicate is maintained by experienced folks, your function 
(mine in this case :) ) is not. This is just more job.

> because I get the returncode from 
> run.wait() what "communicate()" does not.

What the problem with getting it from an attribute (returncode) ?


Maric Michaud

Aristote -
3 place des tapis
69004 Lyon
Tel: +33 426 880 097

More information about the Python-list mailing list