Reading output from child process using python

前端 未结 2 571
春和景丽
春和景丽 2021-02-07 12:20

The Context

I am using the subprocess module to start a process from python. I want to be able to access the output (stdout, stderr) as soon as it is writ

2条回答
  •  清歌不尽
    2021-02-07 13:18

    expect has a command called 'unbuffer':

    http://expect.sourceforge.net/example/unbuffer.man.html

    that will disable buffering for any command

提交回复
热议问题