oxjs/tools/geo/py/fix.py
2011-11-23 15:53:17 +01:00

14 lines
No EOL
275 B
Python

import json
import os
base_path = os.path.dirname(__file__)
if base_path:
os.chdir(base_path)
f = open('../json/countries.json')
data = json.loads(f.read())
f.close()
f = open('../json/countries.json', 'w')
f.write(json.dumps(data, indent=4, sort_keys=True))
f.close()