'Wait until a WIDGET is destroyed.
If no parameter is given self is used.'

def wait_window(self, window=None):

    if (window is None):
        window = self
    self.tk.call('tkwait', 'window', window._w)
