On 09/01/2011 10:21 AM, ???????? wrote:
def  myprint():
     print  root.winfo_pointerxy()

canvas.bind("<Button-1>",myprint)

When you bind a function to the canvas, it is expecting a function that takes an argument (which is probably the object to which the binding is bound).

So, you could just allow myprint to take an argument, and ignore it:

def  myprint(arg):
     print  root.winfo_pointerxy()

-dsb

--
Douglas S. Blank, Associate Professor and Chair
Department of Computer Science, Bryn Mawr College
http://cs.brynmawr.edu/~dblank  (610)526-6501
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to