Skip to content

Commit 74c344c

Browse files
author
Director of Analytics
committed
added table helper
1 parent c7c5c05 commit 74c344c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bashplotlib/utils/helpers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,11 @@ def drange(start, stop, step=1.0):
3636
yield r
3737
r += step
3838

39+
def box_text(text, width):
40+
box = "="*(width+4) + "\n"
41+
box += "||" + text.center(width) + "||" + "\n"
42+
box += "="*(width+4)
43+
return box
44+
45+
46+
print box_text("HELLO", 20)

0 commit comments

Comments
 (0)