real time subprocess.Popen via stdout and PIPE

前端 未结 8 1458

I am trying to grab stdout from a subprocess.Popen call and although I am achieving this easily by doing:

cmd = subprocess.Popen(\'         


        
8条回答
  •  醉话见心
    2020-11-30 05:41

    Your interpreter is buffering. Add a call to sys.stdout.flush() after your print statement.

提交回复
热议问题