Skip to content

Latest commit

 

History

History
 
 

README.md

Converting the Processing Python mode examples to py5

Processing IDE comes ready with a big collection of examples. In Processing.py a.k.a Processing Python Mode you had almost all those examples ported/converted to Python. Now we want to have them working on py5!

A first attempt, you can help!

This might still be a rough conversion, you can help by testing the examples and opening an issue!

I'm trying to keep track of the converted sketches I reviewed at issue #1, if you find a broken example you can add your comment there or open a new issue!

How to run this code?

To run this, you'll need py5. I strongly suggest using Thonny IDE and the thonny-py5mode plugin. Step by step instructions here.

To make these converted examples "look and feel" closer to the Processing & Processing Python mode examples, they are written mostly in the style of imported mode. We could have also a collection of module mode examples, and even class mode, etc. Read about the py5 modes here.

Conversion notes

  • Sketches with source in multiple files:

    • For secondary .py files of a sketch I have used this, which is not very nice: from py5 import *
    • I should migrate to using the special # PY5 IMPORTED MODE CODE comment as explained at Importing imported mode code
  • Try some numpy optimization?

  • Not good yet:

    • Topics/Create Shapes/ParticleSystemPShape/ParticleSystemPShape.py