Skip to content

Instantly share code, notes, and snippets.

@KelSolaar
Created September 27, 2011 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KelSolaar/1244869 to your computer and use it in GitHub Desktop.
Save KelSolaar/1244869 to your computer and use it in GitHub Desktop.
Read Os Command Output
from subprocess import Popen, PIPE
p = Popen('ls -l', stdout=PIPE, stderr=PIPE)
stdout, stderr = p.communicate()
print stdout, stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment