p5 from jython
in
Processing with Other Languages
•
2 years ago
Hi, I want to play with processing (and libs) from jython.
So far I'm stuck on:
Traceback (most recent call last):File "tst1.py", line 15, in <module>pp.setup()File "tst1.py", line 7, in setupPApplet.size(200,200,PApplet.OPENGL)TypeError: size(): self arg can't be coerced to processing.core.PApplet
With the code being executed:
- import sys
- sys.path.append("/tests/core.jar")
- sys.path.append("/tests/opengl.jar")
- from processing.core import *
- class ProcSketch(PApplet):
- def setup(self):
- PApplet.size(200,200,PApplet.OPENGL)
- PApplet.background(0)
- def draw(self):
- PApplet.stroke(255)
- PApplet.line(mouseX, mouseY, pmouseX, pmouseY)
- pp = ProcSketch()
- pp.setup()
- pp.draw()
1