adafruit / Adafruit_CircuitPython_seesaw

seesaw helper IC driver for circuitPython
MIT License
62 stars 36 forks source link

adafruit_seesaw.py imports `struct`, which doesn't work on 2.x. #8

Closed dhalbert closed 6 years ago

dhalbert commented 6 years ago

CircuitPython 2.x uses ustruct instead of struct. The common fix is:

try:
    import struct
except ImportError:
    import ustruct as struct

E.g. in https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH/blob/d5491cded0d12716ceb1111ca4c4431111a22df6/adafruit_lis3dh.py#L37

deanm1278 commented 6 years ago

fixed! https://github.com/adafruit/Adafruit_CircuitPython_seesaw/commit/45fadc87b28879a3d721cddf9c92c28737e41e43