I recently asked a Tkinter question on the comp.lang.python usenet group, but I thought it might also be relevant to this mailing list. The thread can be read at http://groups.google.com/group/comp.lang.python/browse_frm/thread/64f3bc64de5dc773/, and excerpts are also included below. Any help would be much appreciated.
If you try something like:
$ python -m Tkinter -c 'Tkinter._test()'
in Terminal on OS X, you'll notice that the window that is spawned does not get focus, rather focus remains in Terminal. Furthermore, if you hit Command+Tab to switch focus to the Python process, you'll notice that for some reason Python has been placed last in the focus order, even though it was just spawned by Terminal.... Every other GUI toolkit I've used (e.g. wxPython, PyQt4, pyglet) does not have this problem. (If you try the basic example from http://www.wxpython.org/tut-part1.php you'll see what I mean.) How are these other toolkits able to steal the focus? More important, is it possible to have a Tkinter app steal the focus, even if it's not the default behavior?