Dump JSON to string first for final \n

master
LEdoian 6 months ago
parent ed2439d086
commit eaef4a72ae

@ -96,7 +96,9 @@ def main():
clock.tick(60)
with open(outputfile, 'wt') as f:
json.dump(result, f)
# Use print or equivalent to have final newline.
to_output = json.dumps(result)
print(to_output, file=f)
pg.quit()

Loading…
Cancel
Save