Skip to content

Commit 6fea32a

Browse files
committed
updating readme
1 parent 9d65c5e commit 6fea32a

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ For easy printing of ascii tables within python
1313
table = Texttable()
1414
table.set_cols_align(["l", "r", "c"])
1515
table.set_cols_valign(["t", "m", "b"])
16-
table.add_rows([ ["Name", "Age", "Nickname"],
17-
["Mr\\nXavier\\nHuon", 32, "Xav'"],
18-
["Mr\\nBaptiste\\nClement", 1, "Baby"] ])
16+
table.add_rows([ [get_color_string(bcolors.GREEN, "Name Of Person"), "Age", "Nickname"],
17+
["Mr\nXavier\nHuon", 32, "Xav'"],
18+
["Mr\nBaptiste\nClement", 1, "Baby"] ])
1919
print table.draw() + "\\n"
2020

2121
table = Texttable()
@@ -35,17 +35,19 @@ For easy printing of ascii tables within python
3535

3636
# Result:
3737

38-
+----------+-----+----------+
39-
| Name | Age | Nickname |
40-
+==========+=====+==========+
41-
| Mr | | |
42-
| Xavier | 32 | |
43-
| Huon | | Xav' |
44-
+----------+-----+----------+
45-
| Mr | | |
46-
| Baptiste | 1 | |
47-
| Clement | | Baby |
48-
+----------+-----+----------+
38+
"Name Of Person" is in GREEN, but markdown doesn't seem to support colors, or I don't want to find it
39+
40+
+----------------+-----+----------+
41+
| Name Of Person | Age | Nickname |
42+
+================+=====+==========+
43+
| Mr | | |
44+
| Xavier | 32 | |
45+
| Huon | | Xav' |
46+
+----------------+-----+----------+
47+
| Mr | | |
48+
| Baptiste | 1 | |
49+
| Clement | | Baby |
50+
+----------------+-----+----------+
4951

5052
text float exp int auto
5153
===========================================

0 commit comments

Comments
 (0)