2014年10月30日 星期四

thread

import os
import time
import subprocess
import multiprocessing
import thread

def two(c,a,t):
        st = 'sudo python ./'+c+'.py -a '+a+' '+t
        subprocess.call(st.split())



thread.start_new_thread( two, ("c","12.5", "1", ) )
thread.start_new_thread( two, ("b","12.5", "1", ) )
time.sleep(2)
os.system("sudo python ./c.py -a 7.5 1")
os.system("sudo python ./b.py -a 7.5 1")

沒有留言:

張貼留言