Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Python Java GLSL Other
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Write Processing sketches in Python.
Jonathan Feinberg <>

See some known issues and the open bugs in the bug tracker. I'm seeking help to create a simple Eclipse plugin.

Quick Start

$ git clone git://
$ cd
$ ant

(or download a distribution from

$ java -jar processing-py.jar
$ java -jar processing-py.jar
$ java -jar processing-py.jar
$ java -jar processing-py.jar
$ cat >
def draw():
    text(frameRate, 20, 20)
$ java -jar processing-py.jar

Put processing extension libraries in the "libraries" directory.

$ curl -O
$ cd libraries
$ unzip ../

Import them in the usual Python way, e.g.

import peasy.PeasyCam
cam = peasy.PeasyCam(this, 200)


import peasy.PeasyCam as PeasyCam
cam = PeasyCam(this, 200)


from peasy import PeasyCam
cam = PeasyCam(this, 200)

Unfortunately, from foo import * is not supported.

Use this to refer to the PApplet you're in, as in the examples above.

Put any Python libraries in the "libraries" directory, or in sketch directories. Only pure-Python libraries will work--nothing that requires "native" code.

Example Code

""" - demonstrate Perlin noise
  Jonathan Feinberg
srcSize = 50
destSize = 400
g = createGraphics(srcSize, srcSize, JAVA2D)

def setup():
    size(destSize, destSize, OPENGL)

def draw():
    t = .0005 * millis()
    for y in range(srcSize):
        for x in range(srcSize):
            blue = noise(t + .1*x, t + .05*y, .2*t)
            g.set(x, y, color(0, 0, 255 * blue))
    image(g, 0, 0, destSize, destSize)


I recently gave a talk about Processing to a group of rather bright 8th-graders, as part of a computer-programming summer camp they were attending at my office. Their curriculum up to that point had been in Python, which is an eminently sensible choice, given the pedagogical roots of the language.

The kids were really turned on by the demos--I showed them the white glove, and Golan Levin's New Year's cards--but they were bogged down by Processing's C-like syntax, which really seems arcane and unnecessarily complex when you're used to Python.

I shared my experience with Processing creators Ben Fry and Casey Reas, and they told me that, indeed, the original Processing was a fork of "Design By Numbers", with Python and Scheme support hacked in. Support for a multi-lingual programming environment was always part of the plan, so they were enthusiastic about any new attempt at the problem.

I was able to hack up a proof of concept in a couple of hours, and have managed to create something worth sharing in a couple of weeks. I was only able to do it at all thanks to the brilliant and beautiful Jython project.

At the time of Processing's first public release, August of 2001, Jython was too young a project to be used in this way. But now, having done absolutely no work to profile and optimize, I can get hundreds of frames per second of 3D graphics on my linux box. So, kudos to the Processing project, and kudos to Jython!

Please play with this, report bugs, and port more of the Processing examples!

Something went wrong with that request. Please try again.