Other new features

EventDispatcher now has a remove_handlers method which provides finer control over the event stack than pop_handlers.

The @event decorator has been fixed so that it no longer overrides existing event handlers on the object, which fixes the common problem of handling the on_resize event. For example, the following now works without any surprises (in pyglet 1.0 this would override the default handler, which sets up a default, necessary viewport and projection):

def on_resize(width, height):

A variant of clock.schedule_interval, clock.schedule_interval_soft has been added. This is for functions that need to be called periodically at a given interval, but do not need to schedule the period immediately. Soft interval scheduling is used by the pyglet.media module to distribute the work of decoding video and audio data over time, rather than stalling the CPU periodically. Games could use soft interval scheduling to spread the regular computational requirements of multiple agents out over time.

In pyglet 1.0, font.load attempted to match the font resolution (DPI) with the operating system's typical behaviour. For example, on Linux and Mac OS X the default DPI was typically set at 72, and on Windows at 96. While this would be useful for writing a word processor, it adds a burden on the application developer to ensure their fonts work at arbitrary resolutions. In pyglet 1.1 the default DPI is set at 96 across all platforms. It can still be overridden explicitly by the application if desired.

Video sources in pyglet.media can now be stepped through frame-by-frame: individual image frames can be extracted without needing to play back the video in realtime.

For a complete list of new features and bug fixes, see the CHANGELOG distributed with the source distribution.