I am trying to create a click event in order to easily see coordinates on my grid. I have been following the effbot tutorial, but it doesn't seem to work within my class. here is what I have:
class Keyboard(Frame):
def __init__(self, root, press):
Frame.__init__(self, root)
self.press = press
self.createWidgets()
self.bind("<Button-1>", self.click)
def click(event):
print("clicked at", event.x, event.y)
When I run this and click somewhere it says:
"TypeError: click() takes 1 positional argument but 2 were given"