Correctly reading stdout/stderr from subprocess
Maric Michaud
maric at aristote.info
Thu Jun 15 04:37:18 EDT 2006
Le Mercredi 14 Juin 2006 19:56, Christoph Haas a écrit :
>
> Quite interesting. I dived into /usr/lib/python2.4/subprocess.py 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 - www.aristote.info
3 place des tapis
69004 Lyon
Tel: +33 426 880 097
More information about the Python-list
mailing list