The malloc(len) call in Wiimote_read() should be replaced with PyByteArray_FromStringAndSize(NULL, len).
The malloc(len) call in Wiimote_read() should be replaced with PyByteArray_FromStringAndSize(NULL, len).