Skip to content
Snippets Groups Projects
Commit bf936fe6 authored by KERDREUX Jerome's avatar KERDREUX Jerome
Browse files

Switch back to psql table

The fancy_grid is great but doesn't work w/ \n
parent bc96a4a1
Branches
No related tags found
No related merge requests found
......@@ -247,21 +247,21 @@ class Device(object):
r.append(['address', self.address])
for k, v in self._get_description().items():
r.append([k, v])
print(tabulate(r, tablefmt='fancy_grid'))
print(tabulate(r, tablefmt='psql'))
# attributes
if len(self._get_attributes()) > 0:
r = []
for k, v in self._get_attributes().items():
r.append([k, str(v)])
print(tabulate(r, tablefmt='fancy_grid'))
print(tabulate(r, tablefmt='psql'))
# methods
if len(self.methods) > 0:
r = []
for k, v in self.methods.items():
r.append([k, v.__name__])
print(tabulate(r, tablefmt='fancy_grid'))
print(tabulate(r, tablefmt='psql'))
def __repr__(self) -> str:
return f"<xaal.Device {id(self):x} {self.address} {self.dev_type}>"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment