def do_history ( self , line ) : self . _split_args ( line , 0 , 0 ) for idx , item in enumerate ( self . _history ) : d1_cli . impl . util . print_info ( "{0: 3d} {1}" . format ( idx , item ) )
how to get a past command history python
history Display a list of commands that have been entered .
def do_history(self, line):
        """history Display a list of commands that have been entered."""
        self._split_args(line, 0, 0)
        for idx, item in enumerate(self._history):
            d1_cli.impl.util.print_info("{0: 3d} {1}".format(idx, item))