py5coding / py5generator

Meta-programming project that creates the py5 library code.
https://py5coding.org/
GNU General Public License v3.0
52 stars 13 forks source link

On OSX, py5_tools.save_frames(), animated_gif(), and capture_frames() trip up the animation thread #58

Closed hx2A closed 2 years ago

hx2A commented 2 years ago

The functions do not return after adding the hooks because it prints out progress messages. Those progress messages should be handled differently or skipped altogether.

hx2A commented 2 years ago

Can capture_frames() even be useful on OSX?

hx2A commented 2 years ago

Totally rebuilt these methods so they can return right away and work on OSX. The progress messages are printed to the Jupyter output cell associated with the code, and allows the user to move on to another cell while these are running.

villares commented 2 years ago

Have you tested py5_tools.animated_gif(} outside the Jupyter environment? I couldn't make it work yet, but I know a new release is coming out, I think next week I'll ask you some questions about this...

hx2A commented 2 years ago

I believe they will work with the generic Python interpreter but it doesn't look like they will work with the run_sketch command line utility. However, it would be great if that was possible, because this would be great functionality to make available for Thonny users. Looking at the code, I see where the issue is, but am not comfortable modifying that right before a release. It shouldn't be a big deal to fix this. I'll add it to the todo list for the release after this upcoming one.