pyglet: a cross-platform windowing and multimedia library for Python.
pyglet is a cross-platform windowing and multimedia library for Python, intended for developing games and other visually rich applications. It supports windowing, user interface event handling, Joysticks, OpenGL graphics, loading images and videos, and playing sounds and music. pyglet works on Windows, OS X and Linux.
Some of the features of pyglet are:
- No external dependencies or installation requirements. For most application and game requirements, pyglet needs nothing else besides Python, simplifying distribution and installation. It's easy to package your project with freezers such as PyInstaller.
- Take advantage of multiple windows and multi-monitor desktops. pyglet allows you to use multiple platform-native windows, and is fully aware of multi-monitor setups for use with fullscreen games.
- Load images, sound, music and video in almost any format. pyglet can optionally use FFmpeg to play back audio formats such as MP3, OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264, WMV and Xvid. Without FFmpeg, pyglet contains built-in support for standard formats such as wav, png, bmp, and others.
- pyglet is written entirely in pure Python, and makes use of the ctypes module to interface with system libraries. You can modify the codebase or make a contribution without any second language compilation steps or compiler setup. Despite being pure Python, pyglet has excellent performance thanks to advanced batching for drawing thousands of sprites or animations.
- pyglet is provided under the BSD open-source license, allowing you to use it for both commercial and other open-source projects with very little restriction.