import threading,time
print('开始程序')
def takeApp(ne):
time.sleep(5)
print('执行线程二')
print(ne)
threadObj=threading.Thread(target=takeApp,args=['haha'])
threadObj.start()
print('线程一结束')
import subprocess
calcProc=subprocess.Popen('C:\\Program Files (x86)\\office2010\\Office14\\WINWORD.EXE')
print(calcProc.poll==None) #calcProc.poll为None则证明程序还在
print(calcProc.wait()) # calcProc.wait()返回0,则证明程序终止且无错。返回1,则是有错导致的终止。
print(calcProc.poll()) # calcProc.poll()返回0,则证明程序终止且无错。返回1,则是有错导致的终止。
subprocess.Popen(['C:\\Windows\\system32','C:\\Users\\Administrator\\Desktop\\test.txt'])#这步暂时没调通,报错权限不足,尝试处理了权限问题也不行