-1

我已经使用 pyinstaller 将 python 脚本转换为 exe 文件,每当我打开 exe 程序时,它会闪烁一秒钟并自动关闭。

该程序是一个简单的程序。这是代码片段:

print("Hello World")
4

2 回答 2

1

在程序末尾添加类似input("Press something to exit")time.sleep(10)函数的内容,以便在主函数末尾有一个备用

于 2019-08-01T13:16:16.793 回答
0

如果出于某种原因您不能或不想编辑代码,您可以通过从命令提示符打开文件来查看编译版本的输出。

cd /D C:\location\of\the\file
myFile.exe
于 2019-08-01T13:26:00.450 回答