Changeset 36331 for other-projects/bib-stinky/trunk/doi-stinky/util.py
- Timestamp:
- 2022-07-28T23:48:34+12:00 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/bib-stinky/trunk/doi-stinky/util.py
r36323 r36331 1 1 from __future__ import print_function 2 2 3 import json 3 4 import re 4 5 import sys … … 27 28 28 29 return key 30 31 def writeJSON(json_output_filename,returned_json): 32 33 returned_json_prettyprint = json.dumps(returned_json, indent=2, ensure_ascii=False) 34 35 print("Saving returned JSON output to: " + json_output_filename) 36 37 # write output with auto-close file handle 38 with open(json_output_filename, 'w', encoding="utf8") as fout: 39 fout.write(returned_json_prettyprint)
Note:
See TracChangeset
for help on using the changeset viewer.