Ross Lagerwall rosslagerw...@gmail.com added the comment:
See also issue1260171.
Closing as a duplicate of that.
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - subprocess: more general (non-buffering) communication
type: - enhancement
New submission from anatoly techtonik techto...@gmail.com:
There is no way to write a program in Python capable to process large/unlimited
output coming from a subprocess stream without deadlocks.
http://docs.python.org/library/subprocess.html#subprocess.Popen.communicate
Note The data
Richard Oudkerk shibt...@gmail.com added the comment:
I think the note for communicate() just means that you might get MemoryError
(or some other exception) if the output is too big. But I agree it is
ambiguous.
communicate() uses select() on Unix and threads on Windows, so deadlocks should
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14872
___
___
Python-bugs-list
Daniel Swanson popcorn.tomato.d...@gmail.com added the comment:
what sort of machine has infinite memory?
--
nosy: +weirdink13
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14872
___
Ross Lagerwall rosslagerw...@gmail.com added the comment:
Well if you're *certain* that the process is only using one stream, then you
can just use read/write on that stream.
If not, it probably means you have to use either threads or select/poll.
This is a known issue with subprocess; there
anatoly techtonik techto...@gmail.com added the comment:
The problem with memory is more actual for machines with SSD where swap is
usually turned off and /tmp files are located on memory disk. Hitting memory
limit often means hard reset.
My process is pretty generic that uses all streams,