2011-10-02 13:17:37 +00:00
|
|
|
import json
|
2011-10-07 01:04:47 +00:00
|
|
|
import os
|
2011-10-02 13:17:37 +00:00
|
|
|
|
2011-10-07 01:04:47 +00:00
|
|
|
base_path = os.path.dirname(__file__)
|
|
|
|
if base_path:
|
|
|
|
os.chdir(base_path)
|
|
|
|
|
2011-10-02 13:17:37 +00:00
|
|
|
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()
|