def do_level(self, obj, depth, isLast ):
        if isLast[-1]:
            sep = '`-- '
        else:
            sep = '|-- '
        #sep = '|__ '
        depth += 1
        branch = ''
        for x in isLast[:-1]:
            if x:
                branch += '    '
            else:
                branch += '|   '
        branch = self.colors['tree'] + branch + sep + self.colors['normal']

        children = self.getChildren(obj)
        name = self.getName(obj)

        num = len(children)-1

        if children:
            if self.options.maxdepth and depth >= self.options.maxdepth:
                state = '+'
            else:
                state = '-'
            pre = self.colors['collapsed'] + state + ' '
        else:
            pre = '  '

        yield  pre + branch + name + self.colors['normal'] + '\n'
        #yield  Colors.Yellow + branch + sep + Colors.Normal+ name + '\n'

        if not self.options.maxdepth or depth < self.options.maxdepth:
            for i, x in enumerate(children):
                for line in self.do_level(x, depth, isLast+[i==num]):
                    yield line
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/tools/ipymel.py/TreePager.do_level/original