Livecoding Mode for Python
@catilac ya está trabajando en esto.
Desde el 24/1/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Leverage bevy_ecs to watch the currently running sketch for changes and hotswap on successfully compiling edits
Edit: I'm currently working on this, but there are some architectural questions I have.
Current Approach
I've created a new bevy Asset called Sketch and spawn that object at Startup.
When I make a change to sketch.py bevy will notice. yay
The question now is how does the actual reloading mechanism work for Python? And there is a larger question of how does this mechanism work for other language frontends (Processing4/java, lua, ocaml, scheme, ruby, etc...)
For Python (w/ pyo3)
- Make a change to
sketch.py - Bevy will observe and [emit an event]
processing_pyo3crate will check if a reload is necessary- Using something like importlib.reload(), pyo3 can reload the module, and skip creating a new graphics context if it doesn't have to, and grab the new draw and setup functions.
+--------+ +------+
| Python |------->| Bevy |
+--------+ +------+
^ |
| |
+-- onChange ----+
What about other language front-ends?
I suppose some custom plugin loading could work. The Sketch Asset could be something that Python introduces, so that would allow for us to only use any of that design only for our pyo3 implementation
The other front-ends would have to build their own systems, and we could expose hot-reloading related FFI methods?
I think at the moment, I really like the idea of just having a Python related Livecoding bevy plugin. I'm still learning about bevy's ECS system, but is it possible for us to represent our "scene graph" as an intermediary that can easily map to the existing entities in bevy?
ie:
def draw():
background(220)
fill(255, 0, 100)
stroke(0)
stroke_weight(2)
rect(100, 100, 200, 150)
when I change stroke_weight, could bevy know to update, or refresh that particular entity?
or is it easier to just drop all the entities and re-run the sketch? I might be over thinking it.
For now I'm going to work towards getting python to hotreload.
- Lenguaje dominante
- Rust
- Estrellas
- 69
- Forks
- 14
- Merge medio
- 15 d 22 h
- PR fusionados (30 d)
- 3
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de processing/libprocessing
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
processing/libprocessing#233 ·
-
Dropping Python 3.10 support Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
processing/libprocessing#229 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
processing/libprocessing#201 ·
-
Gate processing_midi for WASM Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
processing/libprocessing#194 ·
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
processing/libprocessing#146 · 1 comentario ·
Todos los issues de processing/libprocessing
Issues similares
-
todo:perf
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
ACP agents get no MCP servers when the thread is created before the project's first worktree loads Abiertostate:needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
zed-industries/zed#64611 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ontola/atomic-server#1625 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
objectionary/phie#154 ·