Created
December 10, 2017 04:52
-
-
Save rsmahmud/fae59ff578daa8b514abff30fed16dc6 to your computer and use it in GitHub Desktop.
create backgroud process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, time, sys, subprocess | |
if len(sys.argv) == 2: | |
time.sleep(5) | |
print 'track end' | |
if sys.platform == 'darwin': | |
subprocess.Popen(['say', 'hello']) | |
else: | |
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