Why Pyglet?¶
- Content display
- No extra compilation
- Multiplatform
- Uses an OS’ native ctypes
- Well-designed (or so they say says me)
- Handles many screens and many windows in Python so if you have extra monitors
- Ate their own own dogfood (presentation is done in Pyglet)
Pyglet!¶
- Modern graphic cards are powerful
- Showed of mandlebrot sets that were live
- Demo done in eee pc.
- Works on Windows, OS X, and Linux
- Put it all together and you get Pyglet
Compared to other things (pygame, pyopengl)¶
- Runs without extra bits
- easier to control
- very pythonic
- Is Python 2.5+
Components (Linx, OS X, Windows)¶
- Open GL
- xlib, Carbon, Win32
- gdk-pixbufm Quicktime, GDI+
- Optionally PIL if you have it
- libpng, libjpeg (problematic)
- Audio (OpenAL, ALSA, DirectSound)
- Lets you do lots of fonty stuff with true text fonts
- Linux media is a mess (unreliable installs, wants to own playback)
Features¶
- streaming audio and video
- image stuff
- resource loading
- resource loading
- event loop
- graphics buffers
- fast sprites
- fast text and formatted text layout
- animated gif support
Third parties¶
- Cocos (A sprite and game engine that runs over Pyglet)
- rabbyt (a fast sprite rendering and animation library)
- ToGepy ()