December 22nd, 2004, 05:55 AM
I've started gettimg my feet wet in Tkinter. Just started my first program but encountered a problem.....
Here's the code.........
Everything works fine...but my system gives me a Runtime Error ... whenever I click on QUIT button...and the Tk window stops responding... the CLICK button works fine!
>>> from Tkinter import *
>>> class App:
... def __init__(self,master):
... def welcome(self):
... print "~~~~~~~~~~~~Welcome to JOHNS HOPKINS~~~~~~~~~~~~~~~~"
December 22nd, 2004, 06:15 AM
My guess is that you are running this from within IDLE?
Run the code from a shell and it should work fine.
If you change one line in your __init__ method then your code will work well with IDLE:
The difference (I think) - destroy - erases widgets, if there are no widgets left to maintain the mainloop then the program terminates and usually the TCL/TK interpreter is stopped too.
Quit tries to stop TK/TCL which happens to be used by the parent process for IDLE.
December 22nd, 2004, 06:27 AM