IcyFlame IcyFlame - 1 year ago 82
Python Question

Hiding the console window


I started designing GUI applications using Python and Tkinter. When I freeze a script using cxFreeze then when I run that EXE file on a machine. Then first the console window (a black DOS shell in the case of Windows XP) opens and then the main window(Tk() instance) gets initialized.


The console window must not appear. Only the Tk() instance should appear.


root = Tk()




Windows XP SP 3

Python 2.7

Tkinter 8.5

Answer Source

When using py2exe use windows=['main.py'] instead of console=['main.py'] when creating your setup.py

For cx_Freeze this answer might help you: http://stackoverflow.com/a/11374527/2256700

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download