def storedata(filename=None):
if filename is None:<EOL><INDENT>filename = '<STR_LIT>'<EOL><DEDENT>ns = get_ipython().user_ns<EOL>with open(filename, '<STR_LIT:wb>') as f:<EOL><INDENT>d = {}<EOL>for var in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>try:<EOL><INDENT>d[var] = ns[var]<EOL><DEDENT>except KeyError:<EOL><INDENT>warnings.warn('<STR_LIT>' % var)<EOL><DEDENT><DEDENT>pickle.dump(d, f)<EOL><DEDENT>
Store the state of the current credolib workspace in a pickle file.