Using subprocess.Popen for Process with Large Output

后端 未结 7 1962
礼貌的吻别
礼貌的吻别 2020-12-02 16:56

I have some Python code that executes an external app which works fine when the app has a small amount of output, but hangs when there is a lot. My code looks like:

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 17:56

    You could try communicate and see if that solves your problem. If not, I'd redirect the output to a temporary file.

提交回复
热议问题