Created
May 23, 2009 03:40
-
-
Save endolith/116485 to your computer and use it in GitHub Desktop.
Python Processing using Jython in Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from processing.core import PApplet | |
class HelloProcessing(PApplet): | |
def setup(self): | |
global p | |
p = self | |
p.size(350, 350) | |
def draw(self): | |
p.fill(p.random(255)) | |
p.rect(150, 150, 50, 50) | |
if __name__ == '__main__': | |
import pawt | |
pawt.test(HelloProcessing()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This file was generated by the Jython installer | |
# Created on Mon May 19 20:25:40 CEST 2008 by me | |
CP="/Users/me/jython2.2.1/jython.jar:/Applications/Processing/lib/core.jar" | |
if [ ! -z "$CLASSPATH" ] | |
then | |
CP=$CP:$CLASSPATH | |
fi | |
"/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java" -Dpython.home="/Users/me/jython2.2.1" -classpath "$CP" org.python.util.jython "$@" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Based on OS X script from http://i.document.m05.de/?p=483 | |
# Until Bug #377135 is fixed, you'll need to manually edit this to | |
# point to wherever you put Processing | |
CLASSPATH="$HOME/Applications/Processing/lib/core.jar" | |
# (https://bugs.launchpad.net/ubuntu/+bug/377135) | |
# Note that if this path is wrong, it won't warn you in any way. | |
# Just try "import processing" to test if it worked. | |
# If CLASSPATH exists, it is appended by the /usr/bin/jython script, so let's just call that | |
export CLASSPATH | |
jython "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment