gryphius / pycyborg

My first attempt at reverse engineering a USB protocol - cyborg gaming lights
7 stars 5 forks source link

Python3 Compatibility #5

Closed Overboard closed 7 years ago

Overboard commented 7 years ago

If you've an interest in Python3 compatibility, please consider the following. This was made with the intent to maintain compatibility with both 2 and 3, but not require 'pip install future'.

  1. Ran all files thru the 2to3.py script.
  2. Checked against python-future.org
  3. Added try/excepts for Queue vs queue and raw_input vs input
  4. Tested on Py 2.7.13 and 3.5.2

Caveat: I didn't test all execution paths, particularly where third party packages were involved (i.e. boblight, audiovisualizer, and lightpack). I also didn't address any cosmetic issues (extra parans) with print. If you'd prefer, I could re-tool it with the 'future' package.

gryphius commented 7 years ago

thanks, much appreciated! I haven't tested the changes as I currently don't have my cyborgs available, but lgtm