def load_game(save_path):
jsonpickle.set_preferred_backend('simplejson')
#cur_path = os.path.dirname(__file__)
#save_path = os.path.relpath('..\\Save Game\\' + file_name, cur_path)
with open(save_path, 'r') as save:
state = jsonpickle.decode(save.read(), keys = True)
#print("State:")
#for s in state:
# print(s)
#save = shelve.open(file_name, writeback = False)
#state = dict()
#for k, v in save.items():
# state[k] = v
#save.close()
#save = shelve.open(file_name, flag = "n", writeback = False)
return state
评论列表
文章目录