Correctly reading stdout/stderr from subprocess
maric at aristote.info
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/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) ?
Aristote - www.aristote.info
3 place des tapis
Tel: +33 426 880 097
More information about the Python-list