而过"/>
pyinstaller打包后偶尔出现黑窗口一闪而过
原因:代码中使用了os.system或subprocess等执行了cmd命令。
解决:所有的cmd命令改用subprocess来执行。
import subprocess
重点:在于后面的参数:creationflags=0x08000000
subprocess.check_output(cmd, creationflags=0x08000000)
subprocess.call(cmd, creationflags=0x08000000)
更多推荐
pyinstaller打包后偶尔出现黑窗口一闪而过
发布评论