1

I am trying to run

proc = Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

with the output being monitored with comm = proc.communicate(). This works fine, in that I can print comm[0] or comm[1] and get all of the output, but it doesn't work in real time, only all at the end of the process.

Is there a way to have the stability of communicate() with the speed of just running something like proc.stdout.readline()? I get clogged (as the python manual suggests I might) when I try to use proc.stdout.readline().

Alex
  • 143
  • 6

0 Answers0