[Pythonmac-SIG] Problems with Tkinter
DrBHorow@aol.com
DrBHorow@aol.com
Mon, 10 Apr 2000 03:29:16 EDT
I'm a physician and love to program in my spare time. I've had alot of
experience programming in Tcl/Tk and just started learning Python,
particularly to explore Tkinter.
I'm trying a simple script like this:
from Tkinter import *
root = Tk()
button = Button(root, text = "Test")
button.pack()
root.mainloop()
Everything works ok on the Tk end of things. The toplevel window appears with
a button and accepts clicks. The problem I'm having is that as soon as Python
interprets mainloop(), Tk takes over the menubar and all event handling. I
can't reliably interrupt mainloop. Even when I do interrupt it (sometimes by
typing), the original menubar in the Python interpreter is not restored.
Windows do not refresh properly. I usually have to quit Python to the Finder
(by hitting command-option-shift-esc).
I'm running a G3 powerbook/OS 8.1 or 8.6, Tcl/Tk v8.0, Python v1.5.2.
Any help would be much appreciated.
Bob Horowitz
drbhorow@aol.com