5 ms·
Subprocess Hanging: PIPE is your enemy
- bayareaguy 19y agoI've found the pexpect[1] module often works better than subprocess module. pexpect.spawn() also provides a trivial way for the caller of a long running process to periodically regain control and see what's going on via the timeout parameter and the TIMEOUT exception. [1] - http://pexpect.sourceforge.net/pexpect.html http://pexpect.sourceforge.net/pexpect.html