blob: 800a9fe4ab23c7c0a4b7d60f72c03895fcf20c9b [file] [log] [blame]
Ievgeniia Zadorozhna84023022021-12-30 13:00:41 +02001import texttable as tt
2
3
4class helpers(object):
5
6 def __init__(self):
7 pass
8
9 def draw_table_with_results(self, global_results):
10 tab = tt.Texttable()
11 header = [
12 'node name 1',
13 'node name 2',
14 'network',
15 'bandwidth >',
16 'bandwidth <',
17 ]
18 tab.set_cols_align(['l', 'l', 'l', 'l', 'l'])
19 tab.set_cols_width([27, 27, 15, 20, '20'])
20 tab.header(header)
21 for row in global_results:
22 tab.add_row(row)
23 s = tab.draw()
24 print(s)