<s>
pyglet	B-Library
is	O
a	O
library	B-Library
for	O
the	O
Python	B-Language
programming	I-Language
language	I-Language
that	O
provides	O
an	O
object-oriented	B-Language
application	B-Application
programming	I-Application
interface	I-Application
for	O
the	O
creation	O
of	O
games	O
and	O
other	O
multimedia	O
applications	B-Application
.	O
</s>
<s>
pyglet	B-Library
runs	O
on	O
Microsoft	B-Application
Windows	I-Application
,	O
macOS	B-Application
,	O
and	O
Linux	B-Application
;	O
it	O
is	O
released	O
under	O
the	O
BSD	B-Operating_System
Licence	I-Operating_System
.	O
</s>
<s>
pyglet	B-Library
was	O
first	O
created	O
by	O
Alex	O
Holkner	O
.	O
</s>
<s>
Images	O
,	O
video	O
,	O
and	O
sound	O
files	O
in	O
a	O
range	O
of	O
formats	O
can	O
be	O
done	O
natively	O
,	O
with	O
more	O
additional	O
capabilities	O
supplied	O
by	O
the	O
optional	O
AVbin	O
plugin	O
,	O
which	O
uses	O
the	O
Libav	B-Language
package	O
to	O
provide	O
support	O
for	O
audio	O
formats	O
including	O
MP3	B-Application
,	O
Ogg/Vorbis	O
,	O
and	O
Windows	B-Application
Media	I-Application
Audio	I-Application
,	O
and	O
video	O
formats	O
such	O
as	O
DivX	B-Application
,	O
MPEG-2	B-Algorithm
,	O
H.264	B-Application
,	O
WMV	B-Device
,	O
and	O
XviD	B-Algorithm
.	O
</s>
<s>
An	O
advantage	O
of	O
pyglet	B-Library
over	O
many	O
other	O
libraries	O
is	O
that	O
it	O
requires	O
no	O
external	O
dependencies	O
,	O
and	O
uses	O
the	O
ctypes	B-Application
library	B-Library
,	O
a	O
pure-Python	O
C	O
compiler	O
.	O
</s>
<s>
It	O
builds	O
on	O
OpenGL	B-Application
.	O
</s>
<s>
pygame	B-Operating_System
is	O
another	O
library	B-Library
used	O
for	O
making	O
games	O
and	O
is	O
much	O
more	O
widely	O
known	O
than	O
pyglet	B-Library
.	O
</s>
<s>
Compared	O
to	O
pyglet	B-Library
,	O
pygame	B-Operating_System
is	O
not	O
object-oriented	B-Language
and	O
has	O
less	O
functionality	O
.	O
</s>
<s>
As	O
a	O
multimedia	O
library	B-Library
,	O
pyglet	B-Library
comes	O
with	O
batteries	O
included	O
.	O
</s>
<s>
Using	O
OpenGL	B-Application
gives	O
it	O
speed	O
benefits	O
,	O
and	O
is	O
also	O
written	O
entirely	O
in	O
Python	B-Language
,	O
meaning	O
no	O
external	O
dependencies	O
that	O
have	O
to	O
be	O
installed	O
.	O
</s>
<s>
The	O
ffmpeg	O
library	B-Library
can	O
be	O
optionally	O
installed	O
to	O
support	O
more	O
audio	O
formats	O
.	O
</s>
<s>
These	O
features	O
make	O
pyglet	B-Library
much	O
faster	O
than	O
many	O
other	O
multimedia	O
libraries	O
.	O
</s>
<s>
In	O
this	O
example	O
,	O
lines	O
1-2	O
import	O
the	O
pyglet	B-Library
module	O
's	O
necessary	O
components	O
.	O
</s>
<s>
Line	O
4	O
creates	O
a	O
window	O
,	O
and	O
line	O
6	O
calls	O
pyglet	B-Library
to	O
run	O
its	O
event	O
loop	O
.	O
</s>
