StriveMath / p5-python-web

p5-python-web lets you run p5.js sketches written in Python on the web!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

p5-python-web

p5-python-web lets you run p5.js sketches written in Python on the web! It's is a Python execution context with p5.js bindings. It uses Skulpt to execute p5.js sketches written in Python. Its dynamic bindings allow for any p5.js library to be used as well.

The build is hosted on jsDeiliver and is accessible via https://cdn.jsdelivr.net/gh/StriveMath/p5-python-web/dist/p5-python-web.js

Usage

Load p5-python-web.js in a script tag below p5.js (and any libraries) inside index.html (example)

<head>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.6.0/p5.js"></script>
   <!-- load any p5.js libraries -->
   <script src="https://cdn.jsdelivr.net/gh/StriveMath/p5-python-web/dist/p5-python-web.js"></script>
</head>

p5-python-web.js will look for a file called sketch.py inside the same directory as the index.html file.

Teaching

p5-python-web is being developed in tandem with p5.teach.js by Strive for the purposes of programming education. Have a look at the p5.teach.js examples.

Contributors

About

p5-python-web lets you run p5.js sketches written in Python on the web!

License:Apache License 2.0


Languages

Language:HTML 42.1%Language:JavaScript 32.3%Language:Python 21.7%Language:CSS 3.9%