[Pythonmac-SIG] Console window appearing when running application bundled with py2app + delurk

Edward Hartley ed_hartley at mac.com
Sat Jan 5 12:43:39 CET 2008


Thanks for this from me as well, I'd just hit the same issue.
Cheers
Ed

From: Jens Thomas <j.m.h.thomas at dl.ac.uk>
Date: 4 January 2008 14:00:12 GMT
To: Ronald Oussoren <ronaldoussoren at mac.com>
Cc: Pythonmac-Sig <pythonmac-sig at python.org>
Subject: Re: [Pythonmac-SIG] Console window appearing when running  
application bundled with py2app


Ronald Oussoren wrote:

>  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.
>
>
That's perfect - it does exactly what I was after.

Many thanks for the quick response.

Best wishes,

Jens

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080105/0cb34d02/attachment.htm 


More information about the Pythonmac-SIG mailing list