Skip to content

Commit 42c5d9c

Browse files
committed
2 parents 5960486 + 8b6e05e commit 42c5d9c

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

pymycobot/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from __future__ import absolute_import
2-
from pymycobot.mycobot import MyCobot
3-
from pymycobot.generate import MycobotCommandGenerater
4-
from pymycobot.genre import Angle, Coord
2+
import os
3+
if os.environ.get("_MYCOBOT_VERSION_ONLY") != "1":
4+
from pymycobot.mycobot import MyCobot
5+
from pymycobot.generate import MycobotCommandGenerater
6+
from pymycobot.genre import Angle, Coord
57

6-
__all__ = ["MyCobot", "MycobotCommandGenerater", "Angle", "Coord"]
8+
__all__ = ["MyCobot", "MycobotCommandGenerater", "Angle", "Coord"]
79

810
__version__ = "2.5.3"
911
__author__ = "Zachary zhang"

pymycobot/mycobot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _write(self, command):
3737
self._serial_port.flush()
3838
time.sleep(0.05)
3939

40-
def _read(self, size=1024):
40+
def _read(self):
4141
if self._serial_port.inWaiting() > 0:
4242
data = self._serial_port.read(self._serial_port.inWaiting())
4343
self.log.debug("_read: {}".format(data))

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import sys
23

34
PYTHON_VERSION = sys.version_info[:2]
@@ -6,6 +7,7 @@
67
sys.exit(1)
78

89
import setuptools
10+
os.environ["_MYCOBOT_VERSION_ONLY"] = "1"
911
import pymycobot
1012

1113
if PYTHON_VERSION == (2, 7):

0 commit comments

Comments
 (0)