Skip to content

Instantly share code, notes, and snippets.

@nemik
Created November 26, 2012 19:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nemik/4150130 to your computer and use it in GitHub Desktop.
Save nemik/4150130 to your computer and use it in GitHub Desktop.
try:
result = subprocess.Popen(["/bin/bash","/home/linaro/photobooth/photobooth_process.sh"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = result.communicate()
if result.returncode == 0:
return "ok"
return "%s %s %s" % (result.returncode, err, out), 500
except OSError as e:
return " ",e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment