[Tutor] py2exe - supress console window with GUI app?

justinstraube at charter.net justinstraube at charter.net
Mon Nov 22 04:55:02 CET 2004


On Sun, 21 Nov 2004 18:58:38 -0500, Jacob Schmidt wrote:
>> Py2exe created the .exe file but when I run it an empty console 
window
>> appears with the program. I have looked around but havent seen 
anything
>> on how to supress it.
>
>A little earlier in the mailing list, I believe someone wanted similar
>results, and they were directed toward the os.spawn*() functions. I 
didn't
>make very much heads or tails out of the documentation on it, but 
maybe this
>could help?
>
>Jacob Schmidt


Thanks for the quick reply :)

I had tried to read up about os.spawn but it was way too much for me 
also.

Though somehow my problem has been solved. I think I know what it is. I 
had slightly altered setup.py, though Im not sure this had anything to 
do with it.

setup(console = listed,
      windows = [{"script": "OneTime.pyw",
                "icon_resources": [(1, "d:/python23/me.ico")]}])

The .exe shows the icon as it should and no longer has the console box. 
However if I cancel out of opening a file a Nonetype is returned which 
raises an exception. A nice little log file is created for me with the 
traceback.

If anyone is interested in seeing the script or the .exe its available 
at:
http://www.angelfire.com/wi3/phosphorescent/scripts/onetime.html

Its a simple attempt at a One Time pad with GUI. Compressed the .rar 
file is 1907kb, uncompressed its 5.76mb.

regards,

Justin



More information about the Tutor mailing list