I know that Linux gives out a 9-bit two's complement data out of the /dev/input/mice. I also know that you can get that data via /dev/hidraw0 where hidraw is your USB device giving out raw data from the HID.
I know the data sent is the delta of the movement (displacement) rather than position. By the by I can also view gibberish data via the "cat /dev/input/mice".
By using the Python language, how can I read this data? I really rather get that data as in simple integers. But it has proven hard. The real problem is reading the damn data. Is there a way to read bits and do bit arithmetic? (Currently I'm not worrying over root user-related issues. Please assume the script is run as root.)
(My main reference was http://www.computer-engineering.org/ps2mouse/)