Commit 39219fc2 authored by juga's avatar juga
Browse files

Add method to parse V110 file from a given path

parent d0ca906c
......@@ -429,6 +429,16 @@ class V3BWFile(object):
f = cls(header, bw_lines)
return f
def from_v110_fpath(cls, fpath):'Parsing bandwidth file %s', fpath)
with open(fpath) as fd:
text =
all_lines = text.split(LINE_SEP)
header, lines = V3BWHeader.from_lines_v110(all_lines)
bw_lines = [V3BWLine.from_bw_line_v110(line) for line in lines]
return cls(header, bw_lines)
def bw_kb(bw_lines, reverse=False):
bw_lines_scaled = copy.deepcopy(bw_lines)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment