(self)
return self.exit()
Main program loop.
Main program loop.
Main program loop .
def run(self):
        """Main program loop.

        """
        try:
            while True:
                self.stdscr.move(self.cur_pos_y, (self.cur_pos_x - self.x_offset))
                loop = self.get_key()
                if loop is False or loop == -1:
                    break
                self.buffer_idx_y = self.cur_pos_y + self.y_offset
                self.buf_length = len(self.text[self.buffer_idx_y])
                if self.cur_pos_x > self.buf_length:
                    self.cur_pos_x = self.buf_length
                self.buffer_idx_x = self.cur_pos_x
                self.display()
        except KeyboardInterrupt:
            self.close()
        return self.exit()
def run ( self ) : try : while True : self . stdscr . move ( self . cur_pos_y , ( self . cur_pos_x - self . x_offset ) ) loop = self . get_key ( ) if loop is False or loop == - 1 : break self . buffer_idx_y = self . cur_pos_y + self . y_offset self . buf_length = len ( self . text [ self . buffer_idx_y ] ) if self . cur_pos_x > self . buf_length : self . cur_pos_x = self . buf_length self . buffer_idx_x = self . cur_pos_x self . display ( ) except KeyboardInterrupt : self . close ( ) return self . exit ( )