Skip to content

Pyscript 0.20 release

Compare
Choose a tag to compare
@craigbarratt craigbarratt released this 31 Aug 17:44
· 591 commits to master since this release

Pyscript 0.20 is a significant release that supports the Jupyter frontends (eg, notebook, console, lab). This allows fully interactive development and testing of pyscript functions, services, triggers and automation logic. Auto-completion with TAB is supported. See this README.md for more information.

To use Jupyter with pyscript you need to install a kernel shim from the hass-pyscript-jupyter repository.

Other new pyscript features include support for eval(), exec(), globals(), locals() and exceptions (try, except and raise). Error reporting and handling have been improved.

One small change that isn't backward compatible is that the logger path for pyscript has changed from homeassistant.components.pyscript to custom_components.pyscript. Also, the sub-path for pyscript functions has changed. To specify the logging level of a pyscript function FUNCNAME in a pyscript file FILE (without the .py extension), the logger path used in the logger configuration is now:

custom_components.pyscript.file.FILENAME.FUNCNAME

(In 0.11 it was homeassistant.components.pyscript.func.FUNCNAME, which is ambiguous if the same function name is used in different pyscript files.)

There are also a few bug fixes, including an issue that caused task.unique() to not terminate the specified task after the first time.

Enjoy!