I'm trying to set the mouse cursor in a pyglet application. According to the pyglet documentation, this is how I should go about this:
import pyglet
window = pyglet.window.Window()
cursor = window.get_system_mouse_cursor(win.CURSOR_HELP)
window.set_mouse_cursor(cursor)
pyglet.app.run()
However, this gives me the following error:
cursor = window.get_system_mouse_cursor(win.CURSOR_HELP)
NameError: name 'win' is not defined
How can I do this without using my own cursor image files? I'm on linux if that helps.
The CURSOR_HELP attribute is a member of your window class.
Change
win.CURSOR_HELP
to
window.CURSOR_HELP