mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-20 22:55:00 +08:00
Merge pull request #155 from bkinman/feat_python27_tools
Python2.7 support, revisited
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user