problem calling method

pieterprovoost at pieterprovoost at
Wed Jan 14 02:28:53 CET 2009

I'm trying to call a method within my wx frame, but that doesn't seem to work. What am I doing wrong?

class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        self.Bind(wx.EVT_BUTTON, self.test, self.testbutton)
    def sendmail(self):
   def test(self, event):

Clicking the test button returns:

Traceback (most recent call last):
  File "D:\python\bx\", line 120, in test
AttributeError: 'MyFrame' object has no attribute 'sendmail'


This message was sent on behalf of pieterprovoost at at

More information about the Python-list mailing list