format change
This commit is contained in:
@@ -31,15 +31,15 @@ def readLogFile(filename, verbose = True):
|
|||||||
print('Columns:'),
|
print('Columns:'),
|
||||||
print(ncols)
|
print(ncols)
|
||||||
|
|
||||||
# Read data
|
# Read data
|
||||||
wholeFile = f.read()
|
wholeFile = f.read()
|
||||||
# split by alignment word
|
# split by alignment word
|
||||||
chunks = wholeFile.split(b'\xaa\xbb')
|
chunks = wholeFile.split(b'\xaa\xbb')
|
||||||
log = list()
|
log = list()
|
||||||
if verbose:
|
if verbose:
|
||||||
print("num chunks:")
|
print("num chunks:")
|
||||||
print(len(chunks))
|
print(len(chunks))
|
||||||
chunkIndex = 0
|
chunkIndex = 0
|
||||||
for chunk in chunks:
|
for chunk in chunks:
|
||||||
print("len(chunk)=",len(chunk)," sz = ", sz)
|
print("len(chunk)=",len(chunk)," sz = ", sz)
|
||||||
if len(chunk) == sz:
|
if len(chunk) == sz:
|
||||||
@@ -52,7 +52,7 @@ chunkIndex = 0
|
|||||||
if verbose:
|
if verbose:
|
||||||
print(" ",keys[i],"=",values[i])
|
print(" ",keys[i],"=",values[i])
|
||||||
|
|
||||||
log.append(record)
|
log.append(record)
|
||||||
|
|
||||||
return log
|
return log
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user