def capture_root(self):
        "Capture the root (Tk instance) of this application."
        widget = self.master
        while not isinstance(widget, widgets.Tk):
            widget = widget.master
        self.__tk = widget
Capture the root (Tk instance) of this application.
recipes/Python/577635_Directory_Pruner_3/recipe-577635.py