Python Subprocess Pipe Blocking
The subprocess will output several characters, and I want to send some response via stdin. The length of the output is predictable, so I wrote code like this: p = Popen('myproc', s
Solution 1:
myproc
may use a block-buffering mode when the standard output is redirected i.e., your parent Python won't see anything until the corresponding buffer in the child is flushed. See several ways to workaround it in this answer (and follow the corresponding links there).
Post a Comment for "Python Subprocess Pipe Blocking"