ttable
1 ttable
from xlib.util.ascii_art import ttable1.1 普通表格
code
x = Ttable("Test title", 4)
x.header("column1", "column2", "column3", "column4")
x.append("t1", "t2", "very long entry", "test")
x.append(("r", "r3"), ("l", "l2"), "also long entry", "test")
print(x)output
+-----------------------------------------------+
| Test title |
+---------+---------+-----------------+---------+
| column1 | column2 | column3 | column4 |
+---------+---------+-----------------+---------+
| t1 | t2 | very long entry | test |
| r | l | also long entry | test |
+---------+---------+-----------------+---------+1.2 Very long ttable title
code
output
1.3 ttable with complicated header
code
output
1.4 Colors
code
output
1.5 Adjustments
code
output
1.6 Special entries
code
output
1.7 host info
code
output
1.8 换行
code
output
1.9 rowdict
code
output
1.10 中文
code
output
2 ttable_shortcuts
2.1 横版表格
Last updated