Skip to content

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

License

Notifications You must be signed in to change notification settings

StriveMath/p5-python-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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