environment/lib/python2.7/site-packages/IPython/frontend/qt/console/history_console_widget.py
def history_previous(self, substring='', as_prefix=True):
        """ If possible, set the input buffer to a previous history item.

        Parameters:
        -----------
        substring : str, optional
            If specified, search for an item with this substring.
        as_prefix : bool, optional
            If True, the substring must match at the beginning (default).

        Returns:
        --------
        Whether the input buffer was changed.
        """
        index = self._history_index
        replace = False
        while index > 0:
            index -= 1
            history = self._get_edited_history(index)
            if (as_prefix and history.startswith(substring)) \
                or (not as_prefix and substring in history):
                replace = True
                break

        if replace:
            self._store_edits()
            self._history_index = index
            self.input_buffer = history

        return replace
def history_previous(self, substring='', as_prefix=True):
        index = self._history_index
        replace = False
        while index > 0:
            index -= 1
            history = self._get_edited_history(index)
            if (as_prefix and history.startswith(substring)) \
                or (not as_prefix and substring in history):
                replace = True
                break

        if replace:
            self._store_edits()
            self._history_index = index
            self.input_buffer = history

        return replace
def history_previous ( self , substring = '' , as_prefix = True ) : index = self . _history_index replace = False while index > 0 : index -= 1 history = self . _get_edited_history ( index ) if ( as_prefix and history . startswith ( substring ) ) or ( not as_prefix and substring in history ) : replace = True break if replace : self . _store_edits ( ) self . _history_index = index self . input_buffer = history return replace
If possible, set the input buffer to a previous history item.

        Parameters:
        -----------
        substring : str, optional
            If specified, search for an item with this substring.
        as_prefix : bool, optional
            If True, the substring must match at the beginning (default).

        Returns:
        --------
        Whether the input buffer was changed.
If possible set the input buffer to a previous history item .