# Processing.js but for Python?

**URL:** <https://discourse.processing.org/t/processing-js-but-for-python/16578>\
**Category:** Processing.py\
**Created:** [December 22, 2019, 10:08pm UTC](https://discourse.processing.org/t/processing-js-but-for-python/16578 "2019-12-22T22:08:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pfe1223](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@pfe1223](https://discourse.processing.org/u/pfe1223)\
**Post date:** [December 22, 2019, 10:08pm UTC](https://discourse.processing.org/t/processing-js-but-for-python/16578/1 "2019-12-22T22:08:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [December 22, 2019, 10:59pm UTC](https://discourse.processing.org/t/processing-js-but-for-python/16578/2 "2019-12-22T22:59:07Z")

</div>

> [@pfe1223](#):
>
> Is there an equivalent for Processing.js but for Python?

Not [Pjs](http://processingjs.org), but [p5js](https://p5js.org) in Python syntax! 🐍

AFAIK, there are currently 2 projects which transpile Python + Processing syntax to JS + p5js: 😮

> **[GitHub - berinhard/pyp5js: Python to P5.js Transcriptor](https://github.com/berinhard/pyp5js)**
>
> Python to P5.js Transcriptor. Contribute to berinhard/pyp5js development by creating an account on GitHub.

> [@P5py-write p5.js sketch in python](https://discourse.processing.org/t/p5py-write-p5-js-sketch-in-python/16358):
>
> 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](http://p5py.com/) Basically I use brython to translate your python program into javascript to use p5.js and other java…

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [December 22, 2019, 11:11pm UTC](https://discourse.processing.org/t/processing-js-but-for-python/16578/3 "2019-12-22T23:11:48Z")

</div>

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](http://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/](http://GoSubRoutine.GitHub.io/Ball-in-the-Chamber/pjs-cs/)

> <https://github.com/GoSubRoutine/Ball-in-the-Chamber/blob/master/pjs-cs/sketch/sketch.coffee>

---

<div class="post-metadata">

**Author:** ![robertoxyz20](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/robertoxyz20/32/7513_2.png) [@robertoxyz20](https://discourse.processing.org/u/robertoxyz20)\
**Post date:** [December 23, 2019, 3:50pm UTC](https://discourse.processing.org/t/processing-js-but-for-python/16578/4 "2019-12-23T15:50:16Z")

</div>

Oh, so nice!  
You work is excelent
