Python Resources

Updated on July 16  2014

Python In Other Contexts

Deborah R. Fowler

Python in other contexts (cool things to do with python involving graphics of course!)

Updated on March 28  2013
Update on Jan 7  2018


turtle turtle graphics is a popular way to introduce programming to kids (part of logo language in the 60's). For example:
    import turtle                
    t = turtle.Pen()             # opens a window for drawing
    and so on, for a list of functions (methods) click here, for example to go foward without drawing would be t.penup() and t.forward(100)
Turtle geometry is one way to describe L-systems.
More information here.

Tkinter this is python's standard graphics user interface (GUI) package. It is Tcl/Tk. The Tkinter page has a decent set of instructions to see if it will work on your machine. You can find some great examples on the website corresponding to Python for Kids here and click on Download the sample code from the book. (Note - test your tkinter - if it's like my machine you'll have to change the printimport calls from tkinter to Tkinter and then they will work fine).

pygame this is implemented as a set of modules on top of the SDL library. Follow the tutorial instructions listed here to get a simple bouncing ball. Read about games and python as well.

PyOpenGL/freeglut you can use Python with OpenGL.

PIL Python Image Library is a wonderful addition to python if you want to manipulate images. Much like the openGL instructions, the official versions were not compatible on my system, however using the site below this successfully installed. This allows you to manipulate image files in almost all the common formats (png, jpg etc.).