Skip to content

Instantly share code, notes, and snippets.

@garlandkr
Created July 2, 2012 16:31
Show Gist options
  • Save garlandkr/3034114 to your computer and use it in GitHub Desktop.
Save garlandkr/3034114 to your computer and use it in GitHub Desktop.
def cmdline(command):
""" Run commandline and return output """
process = subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]
return process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment