Audit · 7 min
The helper that works until the output grows
Generated when asked to run a command and capture its output.
import subprocess
def run(cmd):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p.wait()
return p.stdout.read(), p.stderr.read()Before it runs
When does this hang?