[Pythonmac-SIG] tkinter, py2app, and the console

Brian Lenihan brian_l at mac.com
Sun Nov 20 23:34:22 CET 2005


On Nov 20, 2005, at 1:06 PM, Jon Rosebaugh wrote:

> When I build a .app version of my program, it runs just fine, but
> there's one little concern. When run, the .app version produces two
> windows: both the normal window it's supposed to produce, and a window
> labeled "Console", in which nothing ever seems to happen. How can I
> keep this Console window from showing up? I'm using Python2.4 and
> tkinter. I can provide source or the compiled .app if needed.

I'm not sure really why this happens.  I work around it using something
like this in the initialization code:

if hasattr(sys, 'frozen'):
         app.top.tk.call('console', 'hide')




More information about the Pythonmac-SIG mailing list