pfe1223
December 22, 2019, 10:08pm
1
Is there an equivalent for Processing.js but for Python? I am looking to write Processing code in Python but have the output run on the web. I am pretty sure that I can’t do this, but thought I’d ask here just in case.
Not Pjs , but p5js in Python syntax!
AFAIK, there are currently 2 projects which transpile Python + Processing syntax to JS + p5js:
Hello guys I’ve made a simple project called p5py. It lets you write p5.js sketch in python.
I’ve been using this to teach my students to learn programming for more than one year. And it’s quite easy to use. Students don’t need to install anything. They just open the website and write python program and run the result immediately in browser with the help of p5.js.
Here is the website. P5py.com
Basically I use brython to translate your python program into javascript to use p5.js and other java…
For a Pjs solution, given Pjs is just another JS library, we can use any language which transpiles to JS.
And among those, CoffeeScript is a mix of Ruby + Python syntax: CoffeeScript.org
Here’s a Pjs sketch I re-wrote in CoffeeScript syntax as an experiment:
GoSubRoutine.GitHub.io/Ball-in-the-Chamber/pjs-cs/
Oh, so nice!
You work is excelent