Python/Tkinter on MAC OS X Aqua (not X11)
Graham Dumpleton
grahamd at dscpl.com.au
Mon Oct 7 22:32:32 EDT 2002
Okay, I worked out that I can get things working if I package the Python
script into a Mac application bundle like the Python.app example for IDLE.
Is there a way however I can get it working without having to do this, ie.,
so I can just run the script on the command line explicitly like I tried
in the first place.
grahamd at dscpl.com.au (Graham Dumpleton) wrote in message news:<dc6f5c99.0210062055.60469a3f at posting.google.com>...
> Is anyone successfully using Python/Tkinter on MAC OS X 10.2.1 with
> native
> Aqua GUI interface (ie. not X11).
>
> I have installed Tcl/Tk 8.4 for MAC OS X Aqua (8.4a4-2 snapshot) from:
>
> http://sourceforge.net/projects/tcl
>
> I have then installed latest Python 2.2.1 tarball from the Python
> website.
>
> I did need to tweak a couple of things, but otherwise seemed to
> install okay.
>
> Now when I go run a Tkinter program, eg:
>
> import sys
> win = Tkinter.Tk()
> b = Tkinter.Button(win,text="hello",command=sys.exit)
> b.pack()
> win.mainloop()
>
> I get the following errors from deep inside Tk when I click on the
> Window
> to try and get it focus.
>
> bash-2.05a$ python ex.py
> SetFrontProcess failed,-606
> SetFrontProcess failed,-606
> ^CTraceback (most recent call last):
> File "ex.py", line 6, in ?
> win.mainloop()
> File "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/lib-tk/Tkinter.py",
> line 929, in mainloop
> self.tk.mainloop(n)
> KeyboardInterrupt
>
> End result is that window can't get focus and is thus unusable.
>
> Have there been any changes in version of tkinter in CVS since 2.2.1
> which
> fix this?
>
> BTW, demo Tk scripts work okay, only Tkinter in Python giving a
> problem.
>
> Thanks.
More information about the Python-list
mailing list