[Pythonmac-SIG] Help in easy way to hide Tk console window
Read Roberts
rroberts at adobe.com
Fri Jan 7 19:54:54 CET 2005
Addendum:
If the Tcl/Tk framework decides that it does not need to open a Tcl
console window, then the commands below fail with an exception
"TclError". In my case, the console window is not put up when I run
my script from the Mac OSX Terminal window with "pythonw GMT.py", but
it is put up when I run the script as a bundle app made by
'bundelbuilder.py". Hence I needed to day:
from Tkinter import all
root=Tk()
try:
root.tk.call('console','hide')
except TclError:
pass
At 10:50 AM -0800 1/7/05, Read Roberts wrote:
>Daniel Steffen answered this from the tcl-mac group:
> import Tkinter
> root=Tkinter.Tk()
> root.tk.call('console','hide')
>or
> root.tk.call('after','idle','console','hide')
>
>
>At 10:03 PM -0800 1/6/05, Read Roberts wrote:
>>I succeeded in fixing a problem with displaying Kanji in my
>>Tkinter-based app under Mac OSX 10.2.8. by building Tcl/Tk 8.4.9.
>>with the patch:
>>http://sourceforge.net/tracker/index.php?func=detail&aid=638966&group_id=12997&atid=312997
>>
>>Now however, when I run by bundle app made with buildapp.py, the
>>resulting app opens a Tcl interpreter console window. This doesn't
>>happen when I run my Python script directly from a Terminal window
>>using pythonw. Any suggestions?
>>
>>Since I am building my own Tcl/Tk framwork, i can of course disable
>>this in the source, but there must be a simpler way via Tkinter.
>
More information about the Pythonmac-SIG
mailing list