pyglet is a cross-platform games and multimedia package.
Detailed documentation is available at http://www.pyglet.org
Global dict of pyglet options. To change an option from its default, you must import pyglet before any sub-packages. For example:
import pyglet
pyglet.options['debug_gl'] = False
The default options can be overridden from the OS environment. The corresponding environment variable for each option key is prefaced by PYGLET_. For example, in Bash you can set the debug_gl option with:
PYGLET_DEBUG_GL=True; export PYGLET_DEBUG_GL
For options requiring a tuple of values, separate each value with a comma.
The non-development options are:
A sequence of the names of audio modules to attempt to load, in order of preference. Valid driver names are:
By default, pyglet creates a hidden window with a GL context when pyglet.gl is imported. This allows resources to be loaded before the application window is created, and permits GL objects to be shared between windows even after they’ve been closed. You can disable the creation of the shadow window by setting this option to False. Recommended for advanced devlopers only.
Since: pyglet 1.1
If set (the default), pyglet will attempt to synchronise the drawing of double-buffered windows to the border updates of the X11 window manager. This improves the appearance of the window during resize operations. This option only affects double-buffered windows on X11 servers supporting the Xsync extension with a window manager that implements the _NET_WM_SYNC_REQUEST protocol.
Since: pyglet 1.1
If True, the Cocoa-based pyglet implementation is used as opposed to the 32-bit Carbon implementation. When python is running in 64-bit mode on Mac OS X 10.6 or later, this option is set to True by default. Otherwise the Carbon implementation is preferred.
Since: pyglet 1.2
The release version of this pyglet installation.
Valid only if pyglet was installed from a source or binary distribution (i.e. not in a checked-out copy from SVN).
Use setuptools if you need to check for a specific release version, e.g.:
>>> import pyglet
>>> from pkg_resources import parse_version
>>> parse_version(pyglet.version) >= parse_version('1.1')
True