os.system('notepad ' + errsavelogfile) #阻塞
非阻塞,有何方法?
1
frostming 2022 年 8 月 16 日
subprocess.Popen(['notepad', errsavelogfile])
|
2
cxxnullptr 2022 年 8 月 16 日
放子进程里运行
|
3
zjj19950716 2022 年 8 月 16 日
cmd /C start xxxxx
|
4
sazima 2022 年 8 月 16 日
loop.run_in_executor
|
5
wwqgtxx 2022 年 8 月 16 日
官方文档都说了多久了别再用 os.system 了,用 subprocess 模块
https://docs.python.org/3/library/subprocess.html |