# Using py5's "Live Coding" feature on Thonny IDE

**URL:** <https://discourse.processing.org/t/using-py5s-live-coding-feature-on-thonny-ide/48967>\
**Category:** py5\
**Created:** [July 7, 2026, 3:20am UTC](https://discourse.processing.org/t/using-py5s-live-coding-feature-on-thonny-ide/48967 "2026-07-07T03:20:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [July 7, 2026, 3:20am UTC](https://discourse.processing.org/t/using-py5s-live-coding-feature-on-thonny-ide/48967/1 "2026-07-07T03:20:29Z")

</div>

The py5 **Live Coding** feature can be briefly described as **a tool that runs your module mode1 sketch and keeps an eye on changes at the source file, updating the running sketch** with any2 changes you save from your editor/IDE.

1. It is not available for _imported mode_. In _module mode_ you have to use `import py`, the `.py5` prefix on py5 functions and `py5.run_sketch()` in the end. Learn all about the py5 modes at [The Five py5 Modes — py5 documentation](https://py5coding.org/content/py5_modes.html)
2. Well, almost any changes, there are a few limitations, nothing serious, you can read the details at [Live Coding — py5 documentation](https://py5coding.org/content/live_coding.html), there are some extra goodies and settings too

**This feature makes it really fast and a pleasure to modify and try small tweaks on a running py5 sketch.**

If your environment is properly set up, like, you might need to activate the virtualenv where py5 was installed, then you should be able to invoke it from the command line using `py5-live-coding sketch-source.py` or maybe `python -m py5_tools live-coding sketch-source.py`, where `sketch-source.py` will be your sketch’s source file.

For people using py5 with the **Thonny IDE** , it usually works to enter `!python -m py5_tools live-coding sketch-source.py` (note the `!`) in the interactive shell at the bottom of the window, but Thonny must be “looking at the right directory”, that is, your file is at the last place it saved a file to, or at the last directory where Thonny ran some code.

In order to make all this easier for people using Thonny and py5 (and often unfamiliar with the command line interface, like many of my students and people who go to my activities at the community center where I work) I made an experimental version of the **thonny-py5mode** plug-in (the one that makes it easy to run imported mode sketches on Thonny) adding a new “Live Coding mode” option, code at: [GitHub - villares/thonny-py5mode at live-coding-mode · GitHub](https://github.com/villares/thonny-py5mode/tree/live-coding-mode)

UPDATED: You should be able to test the experimental version of the plug-in downloading [this file](https://github.com/villares/thonny-py5mode/releases/download/v0.5.0experimental-live-coding/thonny_py5mode-0.5.0.dev0+livecoding-py3-none-any.whl) then using the Thonny panel at **Tools \> Manage plug-ins…** and selecting the install form local file option. This is the first time I try packaging a plug-ins, let’s see how it goes!

And if you are on Windows, I have made an updated version of my **portable Thonny bundle with py5 and the thonny-py5mode plug-in preinstalled for Windows** : [GitHub - lugaralgum/thonny-portable-with-py5 · GitHub](https://github.com/lugaralgum/thonny-portable-with-py5#2026-07-03) and I’d appreciate feedback about this.
