Search code examples
wxpythoncmdpyinstaller

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


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. This is nice when I'm debugging, but isn't gonna be any use (probably even the oposite!) when I distribute my app.


Solution

  • 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.