def restoredata(filename=None):
if filename is None:<EOL><INDENT>filename = '<STR_LIT>'<EOL><DEDENT>ns = get_ipython().user_ns<EOL>with open(filename, '<STR_LIT:rb>') as f:<EOL><INDENT>d = pickle.load(f)<EOL><DEDENT>for k in d.keys():<EOL><INDENT>ns[k] = d[k]<EOL><DEDENT>
Restore the state of the credolib workspace from a pickle file.