Tkinter/IDLE crash

Simon Evans simon at george.maths.unsw.edu.au
Thu Dec 9 20:25:08 EST 1999


   I was making my first foray into Tkinter last night (using Py 1.5.2
 and IDLE with Win 95). Like a good little learner, I typed in the
 simple example from "An introduction to Tkinter", chapter 3:

---------------------------
from Tkinter import *

class App:

    def __init__(self, master):

        frame = Frame(master)
        frame.pack()

        self.button = Button(frame, text="QUIT", fg="red", command=frame.quit)
        self.button.pack(side=LEFT)

        self.hi_there = Button(frame, text="Hello", command=self.say_hi)
        self.hi_there.pack(side=LEFT)

    def say_hi(self):
        print "hi there, everyone!"

root = Tk()

app = App(root)

root.mainloop()
---------------------------

   Press the "Hello" button, and it says hello. Fine and dandy. But press
 the "Quit" button, and *everything* quits. The window, the IDLE session,
 everything! Goodbye python, goodbye IDLE, hello desktop.

   Anyone know what's going on here? Something wrong with my installation,
 perhaps? I'm a Unix boy, so I'll be the first to admit that I might have
 stuffed up the Windows setup somehow.

=================================================================
Simon Evans (simon at maths.unsw.edu.au)
Physical Oceanography Group
School of Mathematics, University of New South Wales, Australia.
http://www.maths.unsw.edu.au/
=================================================================
 



More information about the Python-list mailing list