def _load_file(path):
"""
Use to load a file with dill, used for loading puzzle. file should have \
been wrote with dill.
:param str path: path to the file to load
:return: object (excepted [Puzzle](doc/puzzle.md) but no check is made)
"""
try:
with open(path, "rb") as e:
puzzle.Puzzle.dynamique_type()
return dill.load(e)
except Exception as e:
print "Exception while loading file %s" % path
print e
return None
评论列表
文章目录