views:

50

answers:

1

From here I've copied an example of python gui app, but it's not working. It starts up and show window, but when i click the Quit button it just freze. And if I run it again then i got another quit button in previous window.

Is there error in example code or is this problem with win 7 ? I am using python 2.6.5 and win 7 32 bit.

+2  A: 

When the button is clicked, it tries to call self.quit, which doesn't exist. Try adding this method to the Application class.

....
    def quit(self):
        import sys
        sys.exit()
....
zdav
Thank you very much.
Primoz