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