【发布时间】:2018-01-14 18:12:24
【问题描述】:
我想知道是否有任何方法可以调用 python 脚本并在不同的线程中完全启动该程序,这样主程序(调用者)就不必等到被调用的脚本完成执行。到目前为止,我已经尝试过 subprocess 和 os.system 但这两个都滞后,直到脚本完成执行。
main.py
os.system('"F:\second.py"')
//continue the rest of the code without waiting for second.py to finish
second.py
//do stuff
【问题讨论】:
-
我不太确定@StephenRauch
标签: python multithreading python-3.x python-multiprocessing python-multithreading