10000 Use table.print() rather than print(table), this lets ANSItable catch… · A905275/robotics-toolbox-python@d25a912 · GitHub
[go: up one dir, main page]

Skip to content

Commit d25a912

Browse files
committed
Use table.print() rather than print(table), this lets ANSItable catch the Unicode error under Windows
1 parent dd7cd64 commit d25a912

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

roboticstoolbox/models/list.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,7 @@ def make_table(border):
9595
', '.join(robot.keywords)
9696
)
9797

98-
print(str(table))
99-
100-
try:
101-
make_table('thin')
102-
except UnicodeEncodeError:
103-
make_table('ascii')
98+
table.print()
10499

105100

106101
if __name__ == "__main__": # pragma nocover

roboticstoolbox/robot/Dynamics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def dynamics(self):
7777

7878
for j, link in enumerate(self):
7979
table.row(link.name, *link._dyn2list())
80-
print(table)
80+
table.print()
8181

8282
def dynamics_list(self):
8383
"""

0 commit comments

Comments
 (0)
0