Pyglet

From Wikipedia, the free encyclopedia

Pyglet is a library for the Python programming language that provides an object-oriented application programming interface allowing the creation of games and other multimedia applications. Pyglet runs on Microsoft Windows, Mac OS X, and Linux; it is released under BSD Licence.

Pyglet has no external dependencies: most applications require only Python, simplifying installation and application distribution.

It supports windowed and full-screen operation, and multiple monitors. Images, video, and sound files in a range of formats can be done natively, with more additional capabilities supplied by the optional AVbin plugin, which uses the Libav package to provide support for audio formats including MP3, Ogg/Vorbis, and Windows Media Audio, and video formats such as DivX, MPEG-2, H.264, WMV, and XviD.

Example

import pyglet
 
window = pyglet.window.Window(width=640, height=480, caption="Hello World!")
pyglet.app.run()

See also

  • Pygame, another Python game API, a layer over Simple Directmedia Layer

External links

This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.