The #py5 #LiveCoding feature can be briefly described as a tool that runs your module mode sketch and keeps an eye on changes at the source file, updating the running sketch with changes you save from your editor/IDE.
You can use with any coding editor from the command line, or, if you use #Thonny IDE you could help me test this experimental version of the thonny-py5mode plug-in!
https://discourse.processing.org/t/using-py5s-live-coding-feature-on-thonny-ide/48967
The #py5 #LiveCoding feature can be briefly described as a tool that runs your module mode sketch and keeps an eye on changes at the source file, updating the running sketch with changes you save from your editor/IDE.
You can use it with any coding editor, invoking it from the command line, or, if you use #Thonny IDE you could help me test this experimental version of the thonny-py5mode plug-in that adds a Live Coding mode!
https://discourse.processing.org/t/using-py5s-live-coding-feature-on-thonny-ide/48967
Cheers to all #Python #CreativeCoding people here using #Linux…
Would you like to test a script by our friend and co-maintainer of thonny-py5mode GoToLoop that installs #ThonnyIDE and #py5 on your machine to see how it goes and help improve it?
I wonder if it would be bad form to ask students to run something like this:
curl -fsSL https://Gist.GitHubUserContent.com/GoToLoop/246a31d437aaa8c6eadb7f7186544e0f/raw/thonny-installer.bash -o thonny-installer.bash && chmod +x thonny-installer.bash && ./thonny-installer.bash
(because, you know, it trains them to run potentially dangerous stuff in other occasions)
I love using #ThonnyIDE, and, on Linux, I can use !pip install, !jupyter lab, and !py5-live-coding mysketch.py on the interactive shell console, I wish this would work on Windows too :(
Interactive demo of #shapely’s centroid for the triangle :)
import py5
from shapely import Polygon, Point
def setup():
py5.size(400, 400)
py5.stroke_join(py5.ROUND)
def draw():
py5.background(200)
pts = ((100, 100), (300, 100),
(py5.mouse_x, py5.mouse_y))
xs, ys = zip(*pts)
cx = sum(xs) / len(xs)
cy = sum(ys) / len(ys)
tri = Polygon(pts)
py5.no_fill()
py5.stroke_weight(1)
py5.stroke(0, 200, 0)
py5.shape(Point(cx, cy).buffer(5))
py5.stroke(0, 0, 200)
py5.shape(tri.envelope.buffer(2))
py5.shape(tri.envelope.centroid.buffer(5))
py5.stroke_weight(3)
py5.stroke(0)
py5.shape(tri)
py5.fill(0)
py5.shape(tri.centroid.buffer(2))
py5.run_sketch(block=False)
I have a #CreativeCoding course at Domestika, teaching the first steps of #Python and #py5. The feedback from students always makes me happy!
Check out this work by a student:
https://www.domestika.org/en/projects/1841169-programacion?ttag=a_b_a_villares
And other testimonials:
I have a #CreativeCoding course at Domestika, teaching the first steps of #Python and #py5. The feedback from students always makes me happy!
Check out this work by a student:
https://www.domestika.org/en/projects/1841169-programacion?ttag=a_b_a_villares
And other testimonials: