def exit_handler(e): """When the user leaves, cancel the event.""" # We only want to cancel if the event hasn't expired already nonlocal event_id hide() if event_id is not None: TK_ROOT.after_cancel(event_id)
def exit_handler(e): """When the user leaves, cancel the event.""" # We only want to cancel if the event hasn't expired already nonlocal event_id hide() if event_id is not None: TK_ROOT.after_cancel( event_id )