initial working update

This commit is contained in:
Will Tekulve
2016-02-27 04:02:32 -05:00
parent d565849a35
commit 563d7bb395
8 changed files with 205 additions and 133 deletions

View File

@@ -3,7 +3,7 @@ import json
def fileIO(filename, IO, data=None):
if IO == "save" and data != None:
with open(filename, encoding='utf-8', mode="w") as f:
f.write(json.dumps(data))
f.write(json.dumps(data,indent=4,sort_keys=True,separators=(',',' : ')))
elif IO == "load" and data == None:
with open(filename, encoding='utf-8', mode="r") as f:
return json.loads(f.read())