开发者

Compile app with Pyinstaller, but do not launch cmd when running resulting exe

开发者 https://www.devze.com 2023-03-22 11:47 出处:网络
How can I \"compile\" a GUI application with Pyinstaller, and only get the GUI wxPython generates, when I run the executable? At the moment, when I run the exe, a cmd window pops up, and then the wxPy

How can I "compile" a GUI application with Pyinstaller, and only get the GUI wxPython generates, when I run the executable? At the moment, when I run the exe, a cmd window pops up, and then the wxPython Window. Th开发者_StackOverflowis is nice when I'm debugging, but isn't gonna be any use (probably even the oposite!) when I distribute my app.


I think you need to set the console argument in the EXE class to False. See http://www.blog.pythonlibrary.org/2010/08/10/a-pyinstaller-tutorial-build-a-binary-series/ near the end for a spec file that worked for me. It looks like you can get the spec file to include that setting automatically by passing "-w" when you create it. That's also mentioned in the tutorial.

0

精彩评论

暂无评论...
验证码 换一张
取 消