

def iterate_open_nodes(self, node=None):
    'Generator to iterate over all the expended nodes starting from\n        `node` and down. If `node` is `None`, the generator start with\n        :attr:`root`.\n\n        To get all the open nodes::\n\n            treeview = TreeView()\n            # ... add nodes ...\n            for node in treeview.iterate_open_nodes():\n                print(node)\n\n        '
    if (not node):
        node = self.root
    if (self.hide_root and (node is self.root)):
        pass
    else:
        (yield node)
    if (not node.is_open):
        return
    f = self.iterate_open_nodes
    for cnode in node.nodes:
        for ynode in f(cnode):
            (yield ynode)

dataset/ETHPy150Open kivy/kivy/kivy/uix/treeview.py TreeView.iterate_open_nodes/original