Closed jwarner112 closed 8 years ago
It looks like the only difference between the version 2 and version 3 code in GetDeviceID.py
is the use of raw_input
vs input
.
This could be done much simpler without duplicating the rest of the code by adding this at the top of the file:
if sys.version_info.major == 3:
raw_input = input
Then just using `raw_input``in the script.
This is true, though my design choice was deliberate since Py2 and Py3 are definitely not supposed to be compatible. I didn't want to set the precedent of treating the two as logical equivalents. It's ultimately up to you though, cheers!
Hey there!
I wanted to use this but with Python3. I've also never updated for Python2&3 compatibility before, and figured this would be a fun way to spend an evening and learn something new.