(self)
A simple file browser.
A simple file browser.
A simple file browser .
def browser(self):
        '''A simple file browser.'''

        self.get_dir_cont()
        if self.dir_cont == -1 or self.dir_cont is False:
            return self.dir_cont

        old_highlight = None
        while True:
            if old_highlight != self.highlight or self.highlight == 0:
                self.control.show_dir(self.highlight, self.dir_cont)
            try:
                c = self.control.stdscr.getch()
            except KeyboardInterrupt:
                c = 4

            if 49 <= c <= 57 or c == ord('g'):
                c = self.start_gg(c)

            old_highlight = self.highlight
            if c in self.lookup:
                ret = self.lookup[c]()
                if self.return_flag is True:
                    return ret
def browser ( self ) : self . get_dir_cont ( ) if self . dir_cont == - 1 or self . dir_cont is False : return self . dir_cont old_highlight = None while True : if old_highlight != self . highlight or self . highlight == 0 : self . control . show_dir ( self . highlight , self . dir_cont ) try : c = self . control . stdscr . getch ( ) except KeyboardInterrupt : c = 4 if 49 <= c <= 57 or c == ord ( 'g' ) : c = self . start_gg ( c ) old_highlight = self . highlight if c in self . lookup : ret = self . lookup [ c ] ( ) if self . return_flag is True : return ret