blob: add9e87d285852c3277196d59c04f08b6178359c [file] [log] [blame]
import sys
import texttable as tt
class helpers(object):
def __init__(self):
pass
def draw_table_with_results(self, global_results):
tab = tt.Texttable()
header = [
'node name 1',
'node name 2',
'network',
'bandwidth >',
'bandwidth <',
]
tab.set_cols_align(['l', 'l', 'l', 'l', 'l'])
tab.set_cols_width([27, 27, 15, 20, '20'])
tab.header(header)
for row in global_results:
tab.add_row(row)
s = tab.draw()
sys.stdout.write(s)