error exiting mainloop in tkinter

Newt newt_e at blueyonder.co.uk
Wed Jun 18 10:53:19 EDT 2003


Whilst not very helpful, it ran fine for me. I had to do a slight amount of
formatting as all the tabs/indentations had been lost in your post. (I'm
running 2.2.1 on XP)

Where abouts did the error occur? Did you get the window up, with a single
button?  Was it a windows error and not a python error? Do any other Python
applications work? Can you close the application using the X button on the
top right of the window?

Newt
"Bobster" <nospam at nospam.net> wrote in message
news:MPG.195a731c5ff6fd74989685 at news.vogel.pl...
> 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