def first_child(self):
        if self.is_leaf or not self.expanded: 
            return None
        else:
            if self._node.has_children():
                firstnode = self._node.get_first_child()
                return firstnode.get_widget()
            else:
                return None
Return first child if expanded.
dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/treetools.py/TreeWidget.first_child