The code below allows for multiple optical mice to be read concurrently. It uses the pyusb Python library to interface with the mice. Devices can be connected and read using the USB_Mouse class.
The data is analyzed to provide the direction of the mouse and its relative speed instead of just the raw data array.