Just writing 'import' in a python script breaks my mouse cursor forcing a hard reset

You're not running Python! You're accidentally running this as a shell script. Run it as

python bug.py

or include the shebang line:

#!/usr/bin/env python

Currently, you seem to be running a completely unrelated program named import, designed for screen capture.


This has just happened to me, and without this thread I would never have found the cause. I just would like to add that you can stop the 'import' program by running:

pkill -9 import

And that should fix everything.

Tags:

Python

Debian