This is way out of date, but theres still a link to it on the the Processing wiki. If you want to use Python, use the PDE's Python Mode. If you want to mess with variables in realtime, try the Tweak Mode.
Using Processing as a library inside Jython
Re-written in Jython, from the proce55ing example
C:\Program Files\Java\jdk1.6.0_12\bin;C:\Program Files\jython
.;C:\Program Files\processing-1.0.3\lib\core.jar;C:\Program Files\jython\jython.jar
when this file is saved as p5thon.py, you can run it by calling "jython p5thon.py"
to make a .jar: jythonc -i --core --jar p5thon.jar --compiler javac p5thon.py
then copy p5's core.jar into directory
( Jythonc docs are at http://www.jython.org/Project/jythonc.html )
applet's html:
<applet code="p5thon$App"
archive="p5thon.jar,core.jar"
width="400"
height="400">
</applet>
Using a python interpreter inside Processing for livecoding etc.
Part 2 can't run in the browser even when signed
Put these files in a folder \interp\ together:
interp.pde python.pde
Add jython.jar to \interp\code\
Open interp.pde in the pde and run it.
python.pde by David Nolen ITP downloaded via here