The module pyglet leans on OpenGL for graphics and is used in the scientific community together with Python. This short code snippet shows you how to use it to display an animated GIF file. The download is free, so give it a try. You don't have to download OpenGL to use pyglet.

# load and show an animated gif file using module pyglet
# download module pyglet from:
# the animated dinosaur-07.gif file is in the public domain
# download from
# tested with Python2.5 and pyglet1.1a2  by  vegaseat   22apr2008

import pyglet

# pick an animated gif file you have in the working directory
ag_file = "dinosaur-07.gif"
animation = pyglet.resource.animation(ag_file)
sprite = pyglet.sprite.Sprite(animation)

# create a window and set it to the image size
win = pyglet.window.Window(width=sprite.width, height=sprite.height)

# set window background color = r, g, b, alpha
# each value goes from 0.0 to 1.0
green = 0, 1, 0, 1*green)

def on_draw():
The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.