diff --git a/tools/explore_odrive.py b/tools/explore_odrive.py index 9efaebb7..ebe23bf8 100755 --- a/tools/explore_odrive.py +++ b/tools/explore_odrive.py @@ -1,3 +1,5 @@ +from __future__ import print_function + #!/usr/bin/env python3 """ Load an odrive object to play with in the IPython interactive shell. diff --git a/tools/odrive/protocol.py b/tools/odrive/protocol.py index 18f44a41..aced6cc9 100644 --- a/tools/odrive/protocol.py +++ b/tools/odrive/protocol.py @@ -6,14 +6,14 @@ import sys import abc -# if sys.version_info >= (3, 4): -ABC = abc.ABC -# else: -# ABC = abc.ABCMeta('ABC', (), {}) +if sys.version_info >= (3, 4): + ABC = abc.ABC +else: + ABC = abc.ABCMeta('ABC', (), {}) -# if sys.version_info <= (3, 3): -# from monotonic import monotonic -# time.monotonic = monotonic +if sys.version_info < (3, 3): + from monotonic import monotonic + time.monotonic = monotonic SYNC_BYTE = 0xAA CRC8_INIT = 0x42