I tried this super simple class example from net. (Yes I am a beginner in implementation of object oriented features in Python)
UPDATE: Now from fresh start of IDLE it did not crash, but did not quit properly still. Hmm. TaskManager any (or dozen) python zombies hanging around?? No only one Pythonwin this time.
from Tkinter import *
class HelloPackage:
def __init__(self, parent=None):
self.top = Frame(parent)
self.top.pack()
self.data = 0
self.make_widgets()
def make_widgets(self):
Button(self.top, text='Quit', command=self.top.quit).pack(side=RIGHT)
Button(self.top, text='Hello', command=self.message).pack(side=LEFT)
def message(self):
self.data = self.data + 1
print 'Hello number', self.data
if __name__ == '__main__': HelloPackage().top.mainloop()
It starts OK, and functions well from running directly, but both IDLE and PythonWin crash/hangup on trying to quit with button1
PyScripter handles the program also well (from PortablePython)
OK, I understand somehow that it is some kind of conflict with Tk running IDLE and tk running this program, but does anybody know exactly, what causes it?