Python subprocess output to stdout

前端 未结 1 738
孤城傲影
孤城傲影 2021-02-13 04:12

I am using the subprocess module to run binaries from python.

To capture the output produced by the binary, I am using:

proc = subprocess.Popen (command_         


        
1条回答
  •  囚心锁ツ
    2021-02-13 05:03

    Simply don't send the output to a pipe:

    proc = subprocess.Popen (command_args, shell=False)
    proc.communicate()
    

    0 讨论(0)
提交回复
热议问题