As a beginner in wxpthon, I'm creating a simple login script that creates two buttons: one to open a window for the user to create an account, and one for them to register an account. My relevant code is:
yesbutton = wx.Button(panel, label="Yes, I wish to log in", pos=(50,150), size=(150,60))
self.Bind(wx.EVT_BUTTON, Login.login(Login), yesbutton)
nobutton = wx.Button(panel, label="No, I wish to register", pos=(270,150), size=(150,60))
self.Bind(wx.EVT_BUTTON, Register.register(Register), nobutton)
class Login:
def login(self):
print("login")
class Register:
def register(self):
print("register")
However when I run this code i get:
TypeError: unbound method login() must be called with Login instance as first argument (got classobj instance instead)
I've looked a lot for this answer, but I can't make any solutions work. Thanks in advance.