Search
 
SCRIPT & CODE EXAMPLE
 

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()
Comment

PREVIOUS NEXT
Code Example
Python :: plotly add hline dashed 
Python :: How to use tqdm with pandas apply 
Python :: print python path variable 
Python :: how to return the derivative of a function in python 
Python :: text to speech python 
Python :: python find most occuring element 
Python :: py datetime.date get unix 
Python :: how to make a discord bot dm someone python 
Python :: triangle pygame 
Python :: string module in python 
Python :: python send sms 
Python :: how to read csv file online into pandas 
Python :: godot code for movement for topdown game 
Python :: python year month day hour minute second 
Python :: python except show error 
Python :: pandas plot disable legend 
Python :: get video length python 
Python :: python pandas trim values in dataframe 
Python :: selenium current url 
Python :: check package version python 
Python :: python string list to float 
Python :: how to make otp generator in python 
Python :: make tkinter button disable 
Python :: flash messages django 
Python :: get rid of axes numbers matplotlib 
Python :: filter startswith django 
Python :: qpushbutton text alignment 
Python :: matplotlib grid thickness 
Python :: getpass 
Python :: python max absolute value 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =