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