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