@rzeta0 @yogeshkd @villares

I think it might be possible, and you can install p5py (edit: hm, maybe it's not possible to install packages, not sure), but #Pyodide doesn't currently include all necessary dependencies:

glfw - Not included
numpy Included
Pillow Included
vispy Not included
PyOpenGL-accelerate Not included
PyOpenGL Not included
requests Included
skia-python Not included

@villares: is there a way to run p5py using only Pillow and numpy, without the OpenGL, skia or vispy stuff?

@danzin @rzeta0 @yogeshkd you mean p5py :) and no I think you wouldn't be able. But something like pyp5js would be possible, check https://abav.lugaralgum.com/pyp5js/py5mode/
pyp5js with Pyodide Demo

@villares @rzeta0 Right you are, I meant p5py :)

@yogeshkd: Look at that cool demo, do you think it's feasible to add something like that? Even if it's not the full #PythonFiddle experience, it would be a nice playground. And even better if you could share links to code. Maybe a similar pygame playground could also help bring new users.

@danzin @villares @rzeta0 I just found out about p5 from this thread. It looks really cool. Both p5py pyp5js do not have a pure python wheel on pypi so pyodide is not able to load it. The demo loads it from a CDN but also has a bunch of extra code which I'll need to figure out the purpose of. If the extra code is not necessary, it may be feasible to load it from the CDN, but otherwise it'd be great to find a way to load the extra code from some CDN/github etc so it can stay updated.
@danzin @rzeta0 @villares There isn't a separate step of "installing" packages on python-fiddle. I just load any packages used by inspecting code. Pyodide makes that easy. You are correct though. pyp5js cannot be loaded because pyodide is unable to install some dependencies: Can't find a pure Python 3 wheel for: 'watchdog==2.1.9', 'markupsafe==2.1.1', 'cprint==1.2.2'
Cheers @yogeshkd, I'm afraid pyp5js wouldn't be something you would want to install (it is a simple browser editor using pyodide) but it could inspirw some new project made for python-fiddle that would bridge its pyodide and p5js... @danzin @rzeta0

@danzin @rzeta0 @villares I hacked together a quick demo: https://python-fiddle.com/tools/pyp5js

It's on a separate page because I don't want to load up all the extra dependencies without knowing that the user wants to use p5js. I don't know yet how to guess that because I haven't seen any imports in any of the examples.