Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kaloprominat/5362380 to your computer and use it in GitHub Desktop.
Save kaloprominat/5362380 to your computer and use it in GitHub Desktop.
python: create exec subprecess shell command program stdout stderr result
from subprocess import Popen, PIPE, STDOUT
sprocess = Popen("executing command", shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
result = sprocess.stdout.read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment