simple graphics lib

Corran Webster cwebster at nevada.edu
Tue Aug 21 13:36:10 EDT 2001


In article <b740d7ae.0108201837.59b66065 at posting.google.com>,
k98jh01 at kzoo.edu (Bignose3) wrote:

> I am a student learning python on my own, coming from a C++ backgroud.
>  I am working on a simple project, a simulation of fish, as a way to
> gain experience using python.  I am looking for a simple graphics lib
> that will allow me to display objects- like circles or squares to
> represent the objects I am coding.  Is anyone aware of a lib that will
> allow me to do this.  When learning C++ I used the CMU Graphics Lib
> which worked great.  Let me know if anyone has any ideas.

Tkinter may be all you need for this, and should be accessible on most
platforms.  In particular, the Canvas widget gives a nice, dynamic drawing
environment.  I'd suggest having a look at the brownian.py and electron.py
demos in the Demo/tkinter/guido subdirectory of the python distribution -
these do the same thing that you want to do but with brownian motion and
electron drift rather than flocking/schooling.

You might also want to look at Sping/Piddle (piddle.sf.net) which, while
not optimised for animation, provides a nice cross-platform drawing model
and has a much shorter learning curve than Tkinter.

Corran



More information about the Python-list mailing list