Posts about python (old posts, page 2)

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

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

New py5 Release: 0.5a0

What's new:

  • A second Jupyter Notebook Kernel: py5bot. There's also a new IPython magic called %%py5bot that is available within the py5 kernel.

  • The size() method can be called from the setup() function intead of settings(). Before Sketch execution, py5 will identify code in setup() that belongs in settings() and will segment the code appropriately.

  • Improved error reporting for IPython magics, py5bot, and all static mode sketches

  • Sketch windows now appear in the taskbar or Dock with the py5 logo

Breaking changes:

  • args has been renamed to pargs to avoid a name conflict with the conventional use of the variable args

  • the use_thread default parameter in save() and save_frame() has been changed from False to True

Also:

  • Massive improvements for OSX Users. The OSX Sketch exiting issues have been solved. The other OSX issues are better articulated in the Special Notes for Mac Users.

  • Lots of little bug fixes

What's Ahead:

  • Write Tutorials and How-tos

  • Further develop the py5examples repo

New py5 Release: 0.4a2

What's new:

  • py5 on mybinder

  • Py5SketchPortal widget to view animations on mybinder

  • New println method for correctly printing to stdout and stderr from Sketch methods when using Jupyter lab

Breaking changes:

  • The IPython line magics such as %screenshot and %animatedgif are now ordinary functions in py5_tools. They never should have been line magics in the first place.

Also:

  • Some improvements for OSX Users. The OSX issues are now reduced from critical problems to annoyances

  • Lots of little bug fixes

What's Ahead:

  • Coding trick to allow users to skip a settings() method, like what can be done in the Processing IDE

  • Write Tutorials and How-tos

  • Expand example code in the py5examples repo

New py5 Release: 0.4a1

/images/py5/logo.png

What's new:

  • New py5 logo

  • Drawing helper tools such as render and render_sequence have a new use_py5graphics parameter

Also:

  • Complete, accurate, and truthful docstrings for every field and method in every py5 class

  • Correctly support print statements in Sketch methods when using Jupyter lab

  • Code improvements in the service of producing better documentation

  • Some improvements for OSX Users

  • Lots of little bug fixes

What's Ahead:

  • Continue to address platform specific issues

  • Write Tutorials and How-tos

  • Example Code

New py5 Release: 0.4a0

What's new:

  • PDE Mode has been renamed to Imported Mode

  • A new Jupyter Notebook Kernel devoted to py5

Also:

  • Better support for OSX Users. Specifically, there are no more issues closing Sketch windows.

  • Repairs to all of the existing Reference Documentation. All of the example code now works correctly and all of the descriptions are now factually accurate.

  • Code improvements in the service of producing better documentation

  • Lots of little bug fixes

  • Lots of big bug fixes

What's Ahead:

  • Continue to address platform specific issues

  • Continue to fill in gaps in Reference Documentation

py5 Reference Documentation Progress

Over the past month I've been pretty focused on improving the py5 Reference Documentation. Here's a quick update on what I've accomplished over the past month.

New py5 Release: 0.3a5

What's new:

  • Upgrade to the Processing 4.0 alpha 3 release

  • A new way of using py5: The render-helper-tools. This was a great idea suggested by Allison Parrish.

  • Major cleanup of the IPython Magics to make the magic names and their parameters more consistent. Notably, the units for all time related parameters is now in seconds. Any code that used the magics will need to be updated. Refer to the jupyter-notebooks documentation or the magic docstrings for more information.

  • An exciting new feature to simplify the creation of adhoc Java extensions to boost Sketch performance. I haven't had a chance to document it yet, but trust me, it is pretty neat.

Also:

  • Lots of little bug fixes

  • Code improvements in the service of producing better documentation

  • Changes to the setup.py package requirements

What's Ahead:

  • Fixing OSX-specific issues

  • Documentation, documentation, and documentation

Happy Holidays!

Happy Holidays!

This is the 3D animation I made for my holiday cards, using the open source library I've been building, py5. You'll need ChromaDepth glasses to see the 3D effect properly.

Music: This is Christmas by Scott Holmes Music.

The snowflakes are from the old and widely used WWFlakes font by WindWalker64.

The actual source code for this animation is available on github as a gist. This is a good example of how one can easily augment py5 with a Java Processing library.

This animation took some time to create because I first had to figure out how to implement ChromaDepth in Java. It's also the first time I did something notable in Processing using shaders, and that took some effort to learn. Shaders are a topic I've been wanting to explore for a long time and am happy I got the opportunity to do so while creating this. I'm also happy that py5 performed well during the development process. I didn't have to fix any bugs. Hooray!

Also have a look at the animations for 2015, 2016, and 2018. Those animations all require red-cyan anaglyph 3D Glasses.