Hiding console with program compiled in PY2EXE

Jørgen Cederberg jorgencederberg at hotmail.com
Fri Dec 19 03:43:12 EST 2003


duikboot wrote:
> # setup.py
> from distutils.core import setup
> import py2exe
> 
> setup(name="convertdpi",
>       scripts=["convertdpi.pyw"],
> )
> 
> 
> From the dos command prompt:
> c:\python23> python.exe setup.py py2exe

Hi

or instead

# setup.py
from distutils.core import setup
import py2exe
setup(name="convertdpi",
       scripts=["convertdpi.py"],
       )

c:\python23> python.exe setup.py py2exe -w

Which works for me :)

All options are described on http://starship.python.net/crew/theller/py2exe/

Regards
Jorgen


> 
> This works for me.
> 
> Hope it helps,
> 
> Arjen
> "Marc" <mnations at airmail.net> schreef in bericht
> 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