Basic animation in Python - how to

Donn Ingle donn.ingle at gmail.com
Sat Dec 8 11:54:28 EST 2007


> Please refer me to some basic Python code for animation like that .
You are in for a wild ride! Depending on your platform you can use dozens of
different tools. Try wxPython, pyCairo, pyGTK and PIL (Python Imaging
Library) for the most capable.

Basically you are looking at a fairly complex thing - you need to create
a "context" and then draw into it with commands (they vary according to
your toolkit) and then display the result. Loop that and change the drawing
every time and you have animation.

wxPython has very easy widgets for doing something like this (you can use an
animated gif for example), and it's cross-platform so that a big plus. It's
tricky to get into, but well worth it.

hth
\d




More information about the Python-list mailing list