Henrik - May 29, 2012, 5:12 p.m.
I just ran into this issue in Python 3 (so this might not apply to Python 2), but in my case the solution was to RTFM about file buffering and realize that
1) subprocesses will hang if their output buffer fills up, so you must make sure to read all of it as the subprocess runs;
2) Popen.stdout is an instance of FileIO, which means that its read() method returns at most the requested number of bytes but could also return less. You can wrap it in a BufferedReader object to get a read() method that returns all of the requested data.
with Markdown syntax.
Comments are not displayed until they are approved by a
moderator. Moderators will not approve unless the comment
contributes value to the discussion.