There are a number of ways to run Python (not Processing.py Python mode) in the browser: Brython, Transcrypt, Skulpt, et cetera.
In that case, you are running transpiled Python-to-JavaScript in the browser, then hooking it up with either p5.js or Processing.js (Processing in JavaScript) for the Processing features in JavaScript.
Brython
This works with p5.js. Here is some discussion:
- https://forum.processing.org/two/discussion/16959/p5-js-python-brython-or-skulpt
- https://groups.google.com/forum/#!topic/brython/gAAtzh7WtJU
…with proof of concepts:
http://jsfiddle.net/villares/g2sL3eza/
http://jsfiddle.net/a3q5kzqf/1/
Skulpt
Trinket combines skulpt Python-in-browser – with Processing.
I believe that skulpt uses Processing.js – not p5.js
…although there is ongoing discussion: