def _print_table(self, data):
"""Print table to stdout."""
max_width = 45
wrapped_data = \
[["\n".join(wrap(col, max_width))
if ((type(col) is str or type(col) is unicode)
and len(col) > max_width)
else col
for col in row]
for row in data]
table = AsciiTable(wrapped_data)
table.inner_row_border = True
print table.table
评论列表
文章目录