Seeking feedback: Python for creative coding

Thank you very much @mcintyre and @hx2A! That is very kind of you to take a look and offer your thoughts.

underlying mechanism for drawing

It’s Canvas (CanvasRenderingContext2D) for web, Pygame for app (interactive desktop), and Pillow for static (static desktop and Jupyter). It only supports 2D (which probably wont change for the foreseeable future :sweat_smile:).

talk a little more about your work’s need

Yeah sorry I should have probably lead with that. The three big goals I had in mind:

Portable: In my work, things often iteratively prototype from Jupyter to desktop app to web (recent projects have supported both offline and online access). This adapter approach supports that entire journey without necessitating a (full) rewrite.

Agnostic: I don’t always control the environment. For example, cx_freeze executables, restricted Jupyter environments (like Juno or JupyterLite), and managed servers without privileges. Even in static-only hosting for web apps that cannot access public internet (which we do sometimes need to support), it can operate as a pure Python wheel via self-hosted pyscript without too much fuss.

Embeddable: I sometimes operate adjacent to code I didn’t originally write or may not fully control. So the solution shouldn’t assume anything about the rest of the code’s structure or licensing (we’ve had some situations where partners have good reason for BSD / MIT).

Of course, Python is the Lingua franca in my area so, though I really love Java, putting it into Python allows more of my collaborators to participate.

I might be able to help you out with some of py5’s design ideas

Yes! Please let me know what you think!

For example you can avoid needing to register the draw() function

Thank you! Yeah, I noticed that py5 did that. Due to that “embeddable” objective, I wonder if I might have to have the user opt in by having them call a different method to avoid some accidents but I really like the immediacy you are able to achieve. I’ll take a look around at some options and see what folks think internally! Thanks again!

1 Like