Re: [Tutor] Tk code problem (Joseph Q.)
It works if you run from the command line instead of inside IDLE. I thought IDLE was supposed to be able to run Tkinter programs since Python 2.3 but it doesn't seem to work? AFAIK IDLE runs on Linux. There are many other possibilities listed here: http://www.python.org/moin/IntegratedDevelopmentEnvironments eric is popular... Kent Thanks for the link and tips. Joe ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Tk code problem (Joseph Q.)
Joseph Quigley wrote: Hi, It seems that whenever I click the QUIT button the TK windows freezes, then I have to CTRL-ALT-DEL to be able to shut it down. Here's the code (its not mine though): It works if you run from the command line instead of inside IDLE. I thought IDLE was supposed to be able to run Tkinter programs since Python 2.3 but it doesn't seem to work? P.S I'm currently looking for an dedicated python IDE (or IDLE, i never can tell the difference between the two) for Linux. I know about emacs and vi (or vim) (but they're not dedicated). I was wondering if any of you know of any. AFAIK IDLE runs on Linux. There are many other possibilities listed here: http://www.python.org/moin/IntegratedDevelopmentEnvironments eric is popular... Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] Tk code problem (Joseph Q.)
Hi, It seems that whenever I click the QUIT button the TK windows freezes, then I have to CTRL-ALT-DEL to be able to shut it down. Here's the code (its not mine though): 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() It's probably the command=frame.quit Is there another command to close the Tk program? (like raise SystemExit and sys.exit() for the text based programs) Also could I do something like root and tk = Tk()? Thanks, Joseph. P.S I'm currently looking for an dedicated python IDE (or IDLE, i never can tell the difference between the two) for Linux. I know about emacs and vi (or vim) (but they're not dedicated). I was wondering if any of you know of any. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor