Skip to main content

python suprocess

python will keep communicating the output


import subprocess

print '\nread:'
proc = subprocess.Popen(['autosub', 'test.mkv'],
                        stdout=subprocess.PIPE,
                        )
stdout_value = proc.communicate()[0]
print '\tstdout:', repr(stdout_value)



Comments