Files
dobin-avred/utils.py
T
2022-05-27 17:14:11 +02:00

21 lines
419 B
Python

import json
#def saveInfoToFile(filename, pe, matches):
# with open(filename, 'w') as outfile:
def saveMatchesToFile(filename, matches):
# convert first
results = []
for match in matches:
result = {
"start": match.begin,
"end": match.end,
}
results.append(result)
with open(filename, 'w') as outfile:
json.dump(results, outfile)