error exiting mainloop in tkinter

Bobster nospam at nospam.net
Wed Jun 18 08:02:06 EDT 2003


Hi! 

I have problem exiting python/tkinter application (Python 2.2.3 + WinXP)
When I run the self.quit procedure I get windows error: 
	
The instruction at "0x77f7e22a" refernced memory at "0x00000028". The 
memory could not be "read".

Meanwhile all other actions/procedures using tkinter work perfectly.

Bobster


Below I enclos a piece of code (taken from a tkinter book) showing the 
problem.

from Tkinter import * # Interface to Tk widgets

class Application(Frame):
	def __init__(self, master=None):
		Frame.__init__(self, master)
		self.grid()
		self.createWidgets()
	def createWidgets(self):
		self.quitButton = Button ( self, text="Quit", 
command=self.quit )
		self.quitButton.grid()

app = Application() # Instantiate the application class
app.master.title("Sample application")
app.mainloop() # Wait for events




More information about the Python-list mailing list