My Blog (old posts, page 1)

New Py5Vector Class

Over the past few months, one of the most requested py5 features has been a dedicated vector class. Since there is a lot of interest, I wanted to build a draft version of a vector class that I am now making available for discussion with the growing py5 community.

The vector class code associated with this blog post is available on gist, but since this is an evolving process, the most current version will always be in the github repo. I've also created a discussion on github for feedback; please direct your comments and questions there. Feel free to comment or question anything you like. Update: the new Py5Vector class is complete and has been released. Visit the documentation website to learn how to use the Py5Vector class.

Read more…

Happy Holidays!

Happy Holidays!

This year I used my new Axidraw to create my holiday cards. I'm very happy with the result:

holiday card with a wire frame christmas tree and the words "happy holidays" across the top

holiday card with a wire frame christmas tree and the words "merry christmas" across the top

Read more…

New py5 Release: 0.6.0.alpha.2

A big release with new features and important bug fixes!

What's new:

  • Context Managers. This context manager functionality is one of many great ideas found in processing.py that several members of the py5 community have been asking for. Ideas and feedback like this contribute much to py5, so please keep them coming! And many thanks to the processing.py team for coming up with this idea.

  • py5bot now supports the SVG and PDF renderers

  • Update to the latest Processing 4.0 beta 2 jars

  • The save() and save_frame() methods can now save to a io.BytesIO object

  • Version number now conforms to proper semantic versioning standards

Bug Fixes:

  • #40

  • #44

  • Other small bugs I found and fixed along the way

What's Ahead:

  • Rework noise functionality. See #38 for more information. The new version's noise functionality may not be backwards compatible.

  • There are other items on my todo list but I want to make reworking the noise functionality a higher priority. I'll do a new release once this is complete.

Help Test py5 Release 0.6.0-alpha.1

In an effort to improve the py5 release process, I am making the next release available on github for testing before I package and deploy it to PyPI.

Install py5 0.6.0-alpha.1

Here's the command you'll need to install py5 from github:

pip install git+https://github.com/py5coding/py5.git@0.6.0-alpha.1#egg=py5

This needs to be done after the other py5 installation tasks (as explained in the documentation) are completed. The simplest way to go about this is to create a working py5 environment and then run the above command. Don't forget to install the py5 and py5bot kernels, and don't forget to check the version number:

>>> import py5
>>> py5.__version__
'0.6.0-alpha.1'

Since py5's github repositories are split between the py5generator and py5 repositories, there are a bunch of extra steps one must take to install the development version of py5. The only person who uses the development build is me. Moving forward I need to come up with a way to change this so that more people can provide helpful feedback before a release.

Read more…

Jupyter Book Documentation Now Live!

The new py5 documentation website is now live! Go to https://py5.ixora.io to have a look.

The documentation is built with Jupyter Book. One of the reasons why I am so enthusiastic about this is that Jupyter Book is so well designed for creating Python documentation. It's very easy use and the end result is a much higher quality than what I was using before.

Now I need to get to work and document all the great features in py5 that nobody knows about!

Jupyter Book Documentation

I'm enthusiastic about this prototype for py5's documentation website: py5dev.ixora.io. It is built with Jupyter Book.

Once I got up to speed on Jupyter Book I was able to modify the Reference documentation to use the new system. That was probably the most tedious part. One challenge is that I am using restructuredtext for the documentation source content, so the reference documentation build process also outputs restructuredtext. That's fine because Jupyter Book supports that, but it is clear that markdown or Myst is easier to use. I will use Myst for new documentation files, not restructuredtext.

One of the great features of Jupyter Book is the ability to link the documentation to binder. Readers will be able to launch a notebook kernel right from the documentation. In addition, Jupyter Book supports Thebe, an amazing tool that I never imagined was even possible. Readers will also be able to execute py5 code through the documentation website itself, with the execution results provided by binder. This supports custom kernels like py5bot and embedded animations using the Sketch Portal. This connection with binder will be used extensively in the tutorials and howto sections.

New py5 Release: 0.5a2

Shortly after the 0.5a1 release I learned that the run_sketch utility did not work on Windows computers. It was an easy fix, and critical to support tabreturn aka Trisan Bunn's upcoming CC Fest presentation on Thonny and py5.

While doing additional testing I discovered that the run_sketch utility also did not work correctly on OSX. This was also critical, and unfortunately, not an easy fix. Frankly, it was a painful problem to solve. Nevertheless, I came up with a solution using pyobjc. Now run_sketch will work correctly on all platforms, and everyone who watches tabreturn's presentation on Sunday can give py5 and Thonny a try.

While exploring py5objc I discovered a new approach for running py5 on OSX that I believe I can use to address most the current limitations on OSX. I'll continue exploring this in future releases.

While doing all of this I also expanded py5's support for specifying colors using hexadecimal notation and web color notation. Now assignments to the pixels array can use both notations. In addition, py5 can support 3 character web color notations (e.g. "#822"). See #26 for more information.

What's Ahead:

  • Rework noise functionality

  • OSX feature parity

  • Write Tutorials and How-tos

  • Further develop the py5examples repo

  • Unit tests

Better late than never Camera3D Release

A few days ago the Processing Foundation made the beta release of Processing 4 available for download. This was a great opportunity for me to review the Camera-3D and ColorBlindness libraries to make sure all of the example code works with the new version. I had to make some small changes here and there, as well as update some code to adapt to changes to the Shapes3D library. Everything now works and is ready for you to use in your creative projects.

Read more…

New py5 Release: 0.5a1

The 0.5a0 release was a bad release. I botched the py5bot kernel code in a poorly executed merge, and then didn't do sufficient testing to detect the problem. This release fixes those problems.

I have updated my release process to make sure this doesn't happen again. Also, I will prioritize developing a unit test framework for py5.

I managed to sneak in one new feature to this release: Proper support for specifying colors using hexadecimal notation and web color notion. See #26.

Also, the sketch_portal() method will by default throttle the frame rate to 30 frames per second. Previously the default was for no throttling. This change will improve the experience of users who use this for the first time on mybinder, where a Sketch running at the default Sketch speed of 60 frames per second will look jumpy in the Sketch portal when no throttling is used.

What's Ahead:

  • Write Tutorials and How-tos

  • Further develop the py5examples repo

  • Unit tests, because clearly this project needs them