def __event_loop__(self, **win_args):
        """
        The event loop thread function. Do not override or call
        directly (it is called by __init__).
        """
        gl_lock.acquire()
        try:
            try:
                super(ManagedWindow, self).__init__(**self.win_args)
                self.switch_to()
                self.setup()
            except Exception as e:
                print((str(e)) % "Window initialization failed: %s")
                self.has_exit = True
        finally:
            gl_lock.release()

        clock = Clock()
        clock.set_fps_limit(self.fps_limit)
        while not self.has_exit:
            dt = clock.tick()
            gl_lock.acquire()
            try:
                try:
                    self.switch_to()
                    self.dispatch_events()
                    self.clear()
                    self.update(dt)
                    self.draw()
                    self.flip()
                except Exception as e:
                    print("Uncaught exception in event loop: %s" % str(e))
                    self.has_exit = True
            finally:
                gl_lock.release()
        super(ManagedWindow, self).close()
dataset/ETHPy150Open sympy/sympy/sympy/plotting/pygletplot/managed_window.py/ManagedWindow.__event_loop__/swapped operands of `%`