[Pythonmac-SIG] Console window appearing when running application bundled with py2app
Ronald Oussoren
ronaldoussoren at mac.com
Fri Jan 4 13:21:41 CET 2008
On Friday, January 04, 2008, at 12:37PM, "Jens Thomas" <j.m.h.thomas at dl.ac.uk> wrote:
>Hello,
>
>I've (finally) managed to get everything in place to build my
>python/vtk/Tk application as a universal binary and have py2app (0.3.6)
>successfully bundle it into an app.
That's a Tk artifact on OSX. You can hide that window using a function like this:
def hideTkConsole(root):
try:
root.tk.call('console', 'hide')
except Tkinter.TclError:
# Some versions of the Tk framework don't have a console object
pass
This code is from IDLE. There are more Tk-on-OSX goodies in idlelib.macosxSupport.
Ronald
More information about the Pythonmac-SIG
mailing list