def __init__(self, shell=None, config=None, **traits):
        """Create a new history manager associated with a shell instance.
        """
        # We need a pointer back to the shell for various tasks.
        super(HistoryManager, self).__init__(shell=shell, config=config,
            **traits)
        self.save_flag = threading.Event()
        self.db_input_cache_lock = threading.Lock()
        self.db_output_cache_lock = threading.Lock()
        if self.hist_file != ':memory:':
            self.save_thread = HistorySavingThread(self)
            self.save_thread.start()

        self.new_session()
def __init__ ( self , shell = None , config = None , ** traits ) : super ( HistoryManager , self ) . __init__ ( shell = shell , config = config , ** traits ) self . save_flag = threading . Event ( ) self . db_input_cache_lock = threading . Lock ( ) self . db_output_cache_lock = threading . Lock ( ) if self . hist_file != ':memory:' : self . save_thread = HistorySavingThread ( self ) self . save_thread . start ( ) self . new_session ( )
Create a new history manager associated with a shell instance.