Processing.py sketches sketches on the web

Is there some simple way that I can upload a sketch created in Processing.py to the web so that it can be run by someone without Processing.py on their computer? If not, is there a plan to add this capability in the near future?

2 Likes

There’s this Trinket.io site which can host Python sketches w/ some limited modules.

Among those few modules there’s 1 called “processing” which features basic Processing API:
Trinket.io/docs/python

I didn’t host much on that site yet, but here’s some basic sketch which cross-runs both there online and also on Processing’s Python Mode:

My other Python cross mode sketch can be found on this post below:

However, when I was attempting to deploy a 3rd sketch on Trinket.io which relied on class PVector it didn’t work out!

Although PVector is available on Trinket’s “processing” module, it seems very buggy & incomplete.

I still need to make more PVector experiments w/ basic sketches there in order to make sure it’s indeed buggy or my 3rd sketch had other conversion issues besides PVector alone.

If it comes to that, we could simply write our own basic PVector class in Python, so it cross-works on both environments.

2 Likes

If your sketch uses Processing (Java mode) libraries, then there are no simple online options.

If it is simple and you don’t mind hosting it off a web service, Trinket.io is a good choice as described above.

If you just want to write a sketch using python syntax and have it on your own web page, another option to look at is pyp5js:

Note that this is really “p5.js with python 3 syntax” rather than python 2 + Processing.

3 Likes

Thanks much, Jeremy. I’ll look into the Transcriptor.

2 Likes