Hello from Brazil!
Me and Alexandre Villares have been talking for a while about how we could use Python 3 with Processing. Unfortunately, it seems we’re in a dead end when it comes to Processing.py supporting Python 3 because of the Jython’s dependency. Jython doesn’t have a clear roadmap to support Python 3 and this Stackoverflow’s topic has a lot of links covering this issue.
So, we’ve started to think about other strategies and also to research some other Python explorations on integrations with Processing. Our main results were two projects, both from Professor Claudio Esperanca:
- pyprocessing is a pure Python 2 implementation similar to Processing’s API;
- Brythonide provides an online editor to write Python code integrated with p5.js using the Brython project under the hood.
Both of them are incredible projects, but hey didn’t fit our initial requirements.
pyprocessing is still using Python 2, so it would require the effort of porting it to Python 3. But besides that, there are some API decisions that differs from Processing.py’s one. For us, this was a deal breaker because the sketches we’ve been creating with Processing.py maybe wouldn’t work and, also, we would have to stop using existing Processing’s documentation as our reference.
BrythonIDE, on the other hand, is a very useful tool but it has some drawbacks when it comes to performance. By comparing the frame rate with pure p5.js, we could notice that there’s some slowdowns. But BrythonIDE really opened our ideas to the possibility of integrating Python 3 with p5.js. But it’s definitely worthwhile to take a look at the project’s examples.
We have some issues listed, but we feel that there’s a major one that would really help newcomers on programming to interact with p5.js using Python. We’d love to be able to encapsulate pyp5js as Processing mode or to create its own “live editor”. The issue covering this discussion is titled Encapsulate pyp5js as Processing Mode or perhaps as a Mu mode #41 and feedback or opinions on it would really help us on thinking solutions.