subprocess pipe question
rmorgan466 at gmail.com
Tue Feb 22 18:44:20 EST 2011
I have a process like this,
#cmd=a process which writes a lot of data. Binary/ASCII data
I would like to get cmd's return code so I am doing this,
print rc # and I get 'None' regardless of what cmd gives me (0 thru 255
are valid return codes)
When using wait() it works a bit better but not consistent
When the output of cmd is a small ascii file it works perfectly fine, but
when the file is large (more than 2MB) the process just waits for ever (I am
guessing its blocking?). When I use the communicate call it works perfectly
but my process is consuming way too much memory.
Is there a better way to get my return code consistently efficiently and not
take up so much memory?
--- Get your facts first, then you can distort them as you please.--
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list