【发布时间】:2009-10-23 14:09:03
【问题描述】:
在 Python 中,是否可以在不分叉线程的情况下进行非阻塞系统调用?即,我可以避免吗:
import thread
thread.start_new_thread(os.system,('cmd',))
【问题讨论】:
标签: python
在 Python 中,是否可以在不分叉线程的情况下进行非阻塞系统调用?即,我可以避免吗:
import thread
thread.start_new_thread(os.system,('cmd',))
【问题讨论】:
标签: python
使用subprocess 模块(Popen)并将结果写入文件。您可以“等待”子流程终止或继续其他业务并轮询文件中的结果等。
【讨论】: