I\'m currently in the process of making my Nintendo Wiimote (Kinda sad actually) to work with my computer as a mouse. I\'ve managed to make the nunchuk\'s stick control actu
PyAutoGui works superb.. Thanks to Al Sweigart...
An example of mine...
import pyautogui
pyautogui.FAILSAFE = False
for x in range(555, 899):
pyautogui.moveTo(x, x)
python-uinput is very easy to use.
http://tjjr.fi/software/python-uinput/
Here's an example https://github.com/tuomasjjrasanen/python-uinput/blob/master/examples/mouse.py
Open your terminal and goto cd /usr/share/pyshared/twisted/protocols/mice
may this __init__.py
mouseman.py
python script will work for you,check them out.
The evdev package provides bindings to parts of the input handling subsystem in Linux. It also happens to include a pythonic interface to uinput.
Example of sending a relative motion event and a left mouse click with evdev:
from evdev import UInput, ecodes as e
capabilities = {
e.EV_REL : (e.REL_X, e.REL_Y),
e.EV_KEY : (e.BTN_LEFT, e.BTN_RIGHT),
}
with UInput(capabilities) as ui:
ui.write(e.EV_REL, e.REL_X, 10)
ui.write(e.EV_REL, e.REL_Y, 10)
ui.write(e.EV_KEY, e.BTN_LEFT, 1)
ui.syn()
you might find this helpful:
http://www.eventghost.org/
Good luck!
You can try to interface XTE program from the Python script.