def init_history(self, histfile):
        """
        @type histfile: str
        @return: None
        """
        readline.parse_and_bind("tab: complete")

        if hasattr(readline, "read_history_file"):
            try:
                readline.read_history_file(histfile)
            except IOError:
                pass

            atexit.register(self.save_history, histfile)
def init_history ( self , histfile ) : readline . parse_and_bind ( "tab: complete" ) if hasattr ( readline , "read_history_file" ) : try : readline . read_history_file ( histfile ) except IOError : pass atexit . register ( self . save_history , histfile )
@type histfile: str
        @return: None