New py5 Release: 0.10.10a7

py5
python
Published

May 7, 2026

Version 0.10.10a7 of py5 is now live. What’s new?

Upgraded py5_tools Module

We have upgraded the py5_tools module so you can run code with it from the command line:

$ python -m py5_tools -h
Usage: python -m py5_tools <command> [args...]

Available commands:
  cmd
  translate-imported2module
  translate-module2imported
  translate-processingpy2imported
  utils
  run-sketch
  live-coding
  install-jdk

The last command line tool you is install-jdk, which is a new tool that helps you install the Java Development Kit (JDK) on your system. This will simplify things for beginners who are having setup issues.

$ python -m py5_tools install-jdk -h
usage: __main__.py [-h] [-j JAVA_VERSION] [--jre]

Install Java Development Kit

options:
  -h, --help            show this help message and exit
  -j JAVA_VERSION, --java-version JAVA_VERSION
                        Java Version (must be 17 or greater, defaults to 21)
  --jre                 Install Java Runtime Environment (JRE) instead of Java Development Kit (JDK)

The command line tool is also available through the more direct route with the py5-install-jdk command.

$ py5-install-jdk -j 26
Installing Java Development Kit version 26...
Java Development Kit version 26 installed to /home/jim/.jdk/jdk-26+35

While testing this new feature, Alexandre Villares and I found a bug in py5’s code that starts the JVM. The issue was related to non-ASCII characters. It is likely that this has been causing us support problems for some time. We are both very happy that this is now fixed!

Context Manager Fixes and Improvements

I repaired the type hints for all methods with associated context managers such as begin_shape() or push_matrix(). Also, the begin_record() and begin_raw() methods now correctly return Py5Graphics objects when there is one parameter.

Trimesh Object Conversion

I found a bug in the Trimesh object conversion due to the facets functionality added in the previous release. There are also now flip_u and flip_v keyword arguments to adjust for different UV coordinates systems. From the Trimesh integration page:

def setup():
    global strawberry
    py5.size(300, 500, py5.P3D)
    # the `flip_v=True` kwarg is necessary for this texture to appear correctly
    strawberry = py5.convert_shape(strawberry_scene, flip_v=True)
    assert isinstance(strawberry, py5.Py5Shape)

    strawberry.scale(50)
    strawberry.rotate_z(-py5.radians(90))

Other Bug Fixes and Small Improvements

Python supports something called “entry points” that can be used by a Python library to make other Python libraries aware of their presence in an environment. This allows other Python libraries to add their own jars to the classpath before JVM starts up, which can be useful when using py5 with other Java-based libraries.

I also modernized the organization of py5’s source code, moving away from the previous “flat” directory structure.

And finally, I improved the Live Coding functionality to work better with uv.

What’s Ahead

Next I’d really like to do a release of the py5’s Thonny plugin. An update is overdue!