ttable
1 ttable
from xlib.util.ascii_art import ttable1.1 普通表格
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)+-----------------------------------------------+
| Test title |
+---------+---------+-----------------+---------+
| column1 | column2 | column3 | column4 |
+---------+---------+-----------------+---------+
| t1 | t2 | very long entry | test |
| r | l | also long entry | test |
+---------+---------+-----------------+---------+1.2 Very long ttable title
1.3 ttable with complicated header
1.4 Colors
1.5 Adjustments
1.6 Special entries
1.7 host info
1.8 换行
1.9 rowdict
1.10 中文
2 ttable_shortcuts
2.1 横版表格
2.1 根据规则输出指定颜色
Last updated