def end_graphics():
    global _root_window, _canvas, _mouse_enabled
    try:
        try:
            sleep(1)
            if _root_window is not None:
                _root_window.destroy()
        except __HOLE__ as e:
            print 'Ending graphics raised an exception:', e
    finally:
        _root_window = None
        _canvas = None
        _mouse_enabled = 0
        _clear_keys()
dataset/ETHPy150Open rlpy/rlpy/rlpy/Domains/PacmanPackage/graphicsUtils.py/end_graphics