doceme / py-spidev

MIT License
461 stars 203 forks source link

Fixed fixes for Python 2 & 3 #12

Closed Gadgetoid closed 10 years ago

Gadgetoid commented 10 years ago

I've grabbed and tested rpodgorny's changes and found that while they compile for Python 2 they didn't work. Failing with an undefined symbol error for the missing PyInt_AS_Long method.

I've added some potentially dirty defs to fix that, and have compiled and tested under both Python 2 and 3 by successfully driving a Display-o-Tron 3000 display from a Raspberry Pi using spidev.

doceme commented 10 years ago

Thanks Gadgetoid! I saw the same thing last night and was about tho add the #ifdefs to work around the python2/3 issues, but got distracted. Really appreciate you testing this on python 2 & 3.

Gadgetoid commented 10 years ago

Not a problem! I'm eager to get things working in Python 3 on the Raspberry Pi- for better or worse that's the Python version they teach everyone. Thanks for getting this sorted so quickly!