def cmdline_history_browse(direction):
    if (self.cmdline_history_position == (- 1)):
        self.cmdline_history_position = len(self.cmdline_history)
    self.cmdline_history_position += direction
    if (0 <= self.cmdline_history_position < len(self.cmdline_history)):
        self.cmdline_edit.edit_text = self.cmdline_history[self.cmdline_history_position]
    else:
        self.cmdline_history_position = (- 1)
        self.cmdline_edit.edit_text = ''
    self.cmdline_edit.edit_pos = len(self.cmdline_edit.edit_text)
def cmdline_history_browse(direction):
    if (self.cmdline_history_position == (- 1)):
        self.cmdline_history_position = len(self.cmdline_history)
    self.cmdline_history_position += direction
    if (0 <= self.cmdline_history_position < len(self.cmdline_history)):
        self.cmdline_edit.edit_text = self.cmdline_history[self.cmdline_history_position]
    else:
        self.cmdline_history_position = (- 1)
        self.cmdline_edit.edit_text = 
    self.cmdline_edit.edit_pos = len(self.cmdline_edit.edit_text)