How to move a cursor with Python