pyqt - Hiding console window of Python GUI app with py2exe -


I have a Python program that is used in Qt (PyQt4 actually) and when I launch it from my main.py I'm the console window and the GUI window (windows, of course).

Then I am compiling my program with py2exe and main.exe has been created successfully. However, if I run main.exe (what the program's users will do) the Dragon's console window still appears and all my debug text is stdout-ed on that window.

I want to hide the CMD line window when my application is running and I want my GUI to be executed from the .exe file when it is visible to the user.

Is this possible?

Yes, this is possible.

If I use

  setup (console = ['__ main__.py'], option = {"py2exe": {"included": [" Sip "]}}}  

This creates a console app, though if I select

  setup (windows = ['__ main__.py'], = {"Py2exe": {"contains": ["sip"]}})  

This is not to show the console on the .exe file but output to the main.exe.log file Is dumped into the .exe folder. Be careful.


Comments