def getParent(self, selector):
        if isinstance(selector, str):
            if selector[0] in '.#':
                raise NotImplementedError(
                    'lookup by id and class not yet supported')
            selector = [s.strip() for s in selector.split(',')]
        if self.name in selector: return self
        return self.parent.getParent(selector)
Get the first parent selected by the selector.
dataset/ETHPy150Open ardekantur/pyglet/contrib/wydget/wydget/element.py/Element.getParent