[Edu-sig] IDLE problems with Tkinter

Tim Wilson wilson@isis.visi.com
Fri, 22 Feb 2002 00:07:56 -0600 (CST)


Hi everyone,

My students have used IDLE for all their editing to this point. Now
we're getting to the point of playing with Tkinter a bit and I find that
many, if not all, of the Tkinter apps I try don't exit cleaning and end
up hanging IDLE. We're using Python 2.2 on Win95, but the same thing
happend with Win98. Running the programs from the DOS shell seems to
work fine.

Is this a known problem with IDLE? I'm including a short script below
that exemplifies the problem. The code is from Wesley Chun's Core Python
book.

from Tkinter import *

def resize(ev=None):
    label.config(font='Helvetica -%d bold' % scale.get())

top = Tk()
top.geometry('250x150')

label= Label(top, text="Hello World!", font='Helvetica -12 bold')
label.pack(fill=Y, expand=1)

scale = Scale(top, from_=10, to=40, orient=HORIZONTAL, command=resize)
scale.set(12)
scale.pack(fill=X, expand=1)

quit = Button(top, text="Quit", command=top.quit,
                      activebackground='red', activeforeground='white')
quit.pack()

mainloop()


Thanks for any input anyone can provide.

-Tim

--
Tim Wilson      |   Visit Sibley online:   | Check out:
Henry Sibley HS |  http://www.isd197.org   | http://www.zope.com
W. St. Paul, MN |                          | http://slashdot.org
wilson@visi.com |  <dtml-var pithy_quote>  | http://linux.com