Follow

Hurrdurrderp...

p = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=shell)
out = p.stdout.read()
err = p.stderr.read()

Further down the rabbit hole...

process = subprocess.Popen(...)

if stdin:
stdout_stream, stderr_stream = process.communicate(as_bytes(stdin))
else:
stdout_stream = process.stdout.read()
stderr_stream = process.stderr.read()

Show thread
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!