import pygame
x,y = pygame.mouse.get_pos()
pygame.mouse.set_pos([x+1,y+1])
pygame.mouse.set_pos([x,y])
It's not the neatest solution, but this will simulate a mouse movement. There's probably API's you can call or use of Pythons signal library. But depending on your platform the solution might vary quite a lot.
Or if you need to move the cursor when the window is not active?
import win32api, win32con
def move(x,y,press=False):
win32api.SetCursorPos((x,y))
if press:
click(x,y)
def click(x,y):
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0)
move(10,10,True)