python-spi
python-spi copied to clipboard
Fix up for Python 3.x
Two issues needed fixed. First spidev is not buffered so we need to open it as an unbuffered binary file. Second ctypes.string_at returns a bytes object instead of a str in python 3.x so we don't want to convert a str to an array of integers when returning from read and transfer, since we already have arrays of ints.
Should probably bump version so PyPi and pip see this as an update. I didn't because it could be a minor or a micro depending on opinion.