Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

tracking mouse position tkinter python

import Tkinter as tk
root = tk.Tk()

def motion(event):
    x, y = event.x, event.y
    print('{}, {}'.format(x, y))

root.bind('<Motion>', motion)
root.mainloop()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tracking #mouse #position #tkinter #python
ADD COMMENT
Topic
Name
7+1 =