Python/Tkinter on MAC OS X Aqua (not X11)

Graham Dumpleton grahamd at dscpl.com.au
Mon Oct 7 00:55:34 EDT 2002


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