(self, highlight, dir_cont)
List a directory with highlighting.
List a directory with highlighting.
List a directory with highlighting .
def show_dir(self, highlight, dir_cont):
        '''List a directory with highlighting.'''

        self.draw_text(changed=False)
        for i in range(len(dir_cont)):
            if i == highlight:
                if isdir(self.cur_dir + '/' + dir_cont[i]):
                    try:
                        self.stdscr.addstr(
                            i + 1, 0, dir_cont[i], cur.color_pair(5))
                    except:
                        pass
                else:
                    try:
                        self.stdscr.addstr(
                            i + 1, 0, dir_cont[i], cur.color_pair(3))
                    except:
                        pass
            else:
                if isdir(self.cur_dir + '/' + dir_cont[i]):
                    try:
                        self.stdscr.addstr(
                            i + 1, 0, dir_cont[i], cur.color_pair(4))
                    except:
                        pass
                else:
                    try:
                        self.stdscr.addstr(i + 1, 0, dir_cont[i])
                    except:
                        pass
        self.stdscr.refresh()
def show_dir ( self , highlight , dir_cont ) : self . draw_text ( changed = False ) for i in range ( len ( dir_cont ) ) : if i == highlight : if isdir ( self . cur_dir + '/' + dir_cont [ i ] ) : try : self . stdscr . addstr ( i + 1 , 0 , dir_cont [ i ] , cur . color_pair ( 5 ) ) except : pass else : try : self . stdscr . addstr ( i + 1 , 0 , dir_cont [ i ] , cur . color_pair ( 3 ) ) except : pass else : if isdir ( self . cur_dir + '/' + dir_cont [ i ] ) : try : self . stdscr . addstr ( i + 1 , 0 , dir_cont [ i ] , cur . color_pair ( 4 ) ) except : pass else : try : self . stdscr . addstr ( i + 1 , 0 , dir_cont [ i ] ) except : pass self . stdscr . refresh ( )