See More

import linecache class BPythonLinecache(dict): """Replaces the cache dict in the standard-library linecache module, to also remember (in an unerasable way) bpython console input.""" def __init__(self, *args, **kwargs): super(BPythonLinecache, self).__init__(*args, **kwargs) self.bpython_history = [] def is_bpython_filename(self, fname): try: return fname.startswith(''