On 19-mei-2006, at 16:12, Kevin Walzer wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ronald Oussoren wrote:
>> Hi,
>>
>> Does anyone here know how I can surpress the annoying feature for
>> aqua tk to open a tcl console window when stdin is an empty file.
>> This feature results in an additional window when opening IDLE.app...
>
> In Tcl, the command is "console hide."
>
> Apparently others have had this question as well. I ran across this
> Python snippet on the Pythonmac list via Google:
>
> if hasattr(sys, 'frozen'):
>           app.top.tk.call('console', 'hide')

Thanks for that. I had already implemented my awful hack: sneakily  
ensure that sys.stdin points to the current script, that way tk won't  
think it has to show the console :-).

I'm going to replace my hack with this suggestion.

>
> (see
> http://mail.python.org/pipermail/pythonmac-sig/2005-November/ 
> 015375.html
> for details)
>
> Perhaps this could be a starting point for you.
>
>
>>
>> If all else fails I'll implement an awful hack, but I'd like to find
>> the proper solution first. The aqua tk FAQ page doesn't mention such
>> a solution though.
>>
>
> Re: the Aqua Tk FAQ--are you referring to http://wiki.tcl.tk/12987?
> There's a reference there to "console show," but not "console hide."
> I'll update that later today--thanks for pointing it out.

That's the one I meant.

Now that I have the attention of someone that actually knows  
something about tk :-)... This[1] document mentions I can implement  
support for open events by implementing the tk  
function ::tk::mac::OpenDocument. Do you know how I can implement  
such a function in python?

And a last question for now: is the look&feel of the latest tcltkaqua  
universal release[2] more OSX-HIG compliant than the version shipped  
with OSX? The L&F of IDLE really sucks right now, I have fixed the  
easy things (menus, statusbar) in my local tree, but know to little  
of tkinter/tcltkaqua to fix the rest (dialogs without title bars,  
foreign looking tabbed view in the preferences window, window  
background isn't striped, ...) in a reasonable time.

Ronald

[1] http://tk-components.sourceforge.net/aquify/index.html
[2] I have downloaded but not yet installed: tk-installer- 
universal-8.4.13.pkg.dmg

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to