I have a doubt

Are you sure the indentation is correct here?

Almost looks like you have an empty class followed by a function called init. I would suggest you try this by creating a file rather than on the fly in pyshell.

Cheers!!

Dermot Doran
EMC2
GTS Solutions Level 2
Office: +31-20-7768439
Mobile: +31-6-55815258

···

From: kavitha [mailto:mkavitha@krishtelemaging.com]
Sent: 17 August 2005 10:01
To: wxpython-users@lists.wxwidgets.org
Subject:
[wxPython-users] I have a doubt

can anyone helpme to solve this problem

class Frame1(wx.Frame):
def init(self, parent, title):
wx.Frame.init(self, parent, -1, title, pos=(150,150), size=(350,250))
menuBar = wx.MenuBar()
menu.wx.Menu()
menu.Append(wx.ID_EXIT, “E&xit\tAlt-X”, “Exit the program”)

self.Bind(wx.EVT_MENU, self.OnQuitButton, id=wx.ID_EXIT)

I GOT THE ERROR LIKE THIS WHAT I HAVE TO INCLUDE

Traceback (most recent call last):
File “<pyshell#108>”, line 1, in -toplevel-
self.Bind(wx.EVT_BUTTON, self.OnQuitButton, quitBtn)
NameError: name ‘self’ is not defined

TELL ME IMME PLEASE