Skip to content

Instantly share code, notes, and snippets.

Last active May 30, 2020
What would you like to do?
create backgroud process
import os, time, sys, subprocess
if len(sys.argv) == 2:
print 'track end'
if sys.platform == 'darwin':
subprocess.Popen(['say', 'hello'])
print 'main begin'
subprocess.Popen(['python', os.path.realpath(__file__), '0'], close_fds=True)
print 'main end'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment