Jump to content

Pyglet

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by JJMC89 bot III (talk | contribs) at 21:22, 21 September 2020 (Moving Category:Python libraries to Category:Python (programming language) libraries per Wikipedia:Categories for discussion/Speedy). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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

It supports windowed and full-screen operations as well as 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