Hide the console of an .exe file created with PyInstaller

a 夏天 提交于 2019-11-29 02:54:21

问题


I want to make my program executable. I used TkInter to write the GUI, and I read somewhere that you have to save your file as .pyw to hide the console when the program is executed. The problem is that after making it an executable with PyInstaller, the console shows up again, even though the file converted was .pyw. How can I hide the console also in the .exe file?


回答1:


Did you try --windowed command line flag ?




回答2:


What are you using to make the executable?

If you use py2exe and you use:

setup(windows=[pythonscriptnamehere])

in the setup script instead of:

setup(console=[pythonscriptnamehere])

it will run the executable without launching a terminal in the background.



来源:https://stackoverflow.com/questions/41129537/hide-the-console-of-an-exe-file-created-with-pyinstaller

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!