pyprocessing


A Processing-like environment for doing graphics with Python

This project provides a Python package that creates an environment for graphics applications that closely resembles that of the Processing system. Usage is mostly restricted to importing the package and calling run(). For instance, this simple example taken from a Processing tutorial can be ported to pyprocessing as follows:

// 

// Processing
//
size(200,200);
rectMode(CENTER);
rect(100,100,20,100);
ellipse(100,70,60,60);
ellipse(81,70,16,32);
ellipse(119,70,16,32);
line(90,150,80,160);
line(110,150,120,160);
#

# pyprocessing equivalent
#
from pyprocessing import *
size(200,200)
rectMode(CENTER)
rect(100,100,20,100)
ellipse(100,70,60,60)
ellipse(81,70,16,32)
ellipse(119,70,16,32)
line(90,150,80,160)
line(110,150,120,160)
run()

The project mission is to implement Processing's friendly graphics functions and interaction model in Python. Not all of Processing is to be ported, though, since Python itself already provides alternatives for many features of Processing, such as XML parsing.

The pyprocessing backend is built upon OpenGL and Pyglet, which provide the actual graphics rendering. Since these are multiplatform, so is pyprocessing.

We hope that, much in the same spirit of the Processing project, pyprocessing will appeal to people who want to easily program and interact with computer generated imagery. It is also meant to help teaching computer programming by making it possible to write compact code with rich visual semantics.

Project Information

Labels:
Processing Python OpenGL graphics interaction