Hiding console with program compiled in PY2EXE

Anand Pillai pythonguy at Hotpop.com
Fri Dec 19 12:18:02 CET 2003

The way to prevent a py2exe program from throwing up
a console is to pass the '--windows' option to it.

i.e change your py2exe command line from

%python setup.py py2exe 


%python setup.py py2exe --windows



mnations at airmail.net (Marc) wrote in message news:<4378fa6f.0312182234.42c4fe73 at posting.google.com>...
> Hi all,
> I know that to hide a console normally you simply change the extension
> from .py to .pyw. That's simple enough. However I can't seem to
> accomplish the same thing after freezing the program. I've tried
> building the setup file with the python script as a .pyw file, but it
> crashes and doesn't give me a reason. This is of course because the
> debug window doesn't open, so you don't know what happened (ahh, the
> irony).
> Does anyone know how to successfully freeze a program with py2exe?
> Many thanks,
> Marc

More information about the Python-list mailing list