'Wait until the visibility of a WIDGET changes
(e.g. it appears).
If no parameter is given self is used.'

def wait_visibility(self, window=None):

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