I am trying to grab stdout
from a subprocess.Popen
call and although I am achieving this easily by doing:
cmd = subprocess.Popen(\'
To get output "in real time", subprocess
is unsuitable because it can't defeat the other process's buffering strategies. That's the reason I always recommend, whenever such "real time" output grabbing is desired (quite a frequent question on stack overflow!), to use instead pexpect (everywhere but Windows -- on Windows, wexpect).