Skip to content

Instantly share code, notes, and snippets.

@dboyliao
Created December 21, 2015 08:58
Show Gist options
  • Save dboyliao/4e579b05798ad8bb4fee to your computer and use it in GitHub Desktop.
Save dboyliao/4e579b05798ad8bb4fee to your computer and use it in GitHub Desktop.
#!/path/to/the/python/interpreter/in/virtualenv
# -*- coding: utf-8 -*-
import subprocess
import sys
def main():
try:
subprocess.call("echo 'Hello!'", shell = True)
sys.exit(0)
except Exception as e:
print(e, file = sys.stderr)
sys.exit(1)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment