[Image-SIG] Tkinter / Pmw shutdown crash - please help
Joel Gould
joelg@alum.mit.edu
Sat, 17 Mar 2001 07:59:39 -0500
I have attached a very simple Tkinter program. When I run this on my
Windows 98 SE machine, a crash occurs when the program exits. Without the
MainDialog class it works OK. Without the Pmw initialization call it works
OK. But as written it will crash around 75% of the time.
(1) run the program
(2) press the Test Button
(3) click Cancel in the file open dialog (you do not need to select a file)
(4) click the close button in the upper right corner
--> Boom
Does anyone else see this behavior using Python 2.0, Py20 from Pythonware
and Pmw 0.8.4 on Windows 98?
Thanks,
Joel Gould
-----------------------------------------------------
import Tkinter
import tkFileDialog
import Pmw
def action():
tkFileDialog.askopenfilename(filetypes=[('All','*')])
class MainDialog:
def __init__(self,parent):
Tkinter.Button(parent,text='Test Button',command=action).pack()
root = Pmw.initialise()
dialog = MainDialog(root)
root.mainloop()