mirror of
https://github.com/dobin/avred
synced 2026-06-08 13:54:13 +00:00
21 lines
419 B
Python
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)
|
|
|