whaleygeek / punchcard_reader

Arduino/Raspberry Pi Punchcard reader
MIT License
8 stars 5 forks source link

Python 3 compatibility #2

Open whaleygeek opened 7 years ago

whaleygeek commented 7 years ago

It isn't

whaleygeek commented 7 years ago

Need to pull over the portscan and pyserial module from https://github.com/whaleygeek/bitio and then this will be Python 3 compatible.

whaleygeek commented 7 years ago

Wait for the bitio portscan module to be changed in bitio to change the name of the portscan.cache to that of the device name first, then that will also allow bitio and punchcard_reader to run concurrently in the same Python program.

whaleygeek commented 6 years ago

Had a quick look at this. Remember that Python3 imports work differently. I did a quick test...

delete portscan.py copy portscan folder and serial folder from bitio project into this folder run it up with python3

  File "card2csv.py", line 17, in <module>
    import cardreader
  File "/Users/davidw/tmp/punchcard_reader/cardreader/__init__.py", line 5, in <module>
    from arduino import *
ModuleNotFoundError: No module named 'arduino'

I suspect this is because of the differences in how package imports work between Python2 and Python3, probably all the package based imports need re-coding as well, so this is not a quick fix, and needs to be done and tested properly.

cc @GemmaMayLatham

whaleygeek commented 6 years ago

Gemma reported that this quick fix worked for her, must be a python version/platform thing I guess. Will have to do this properly later and re test it.