Description
Would it be possible to use a decorator to indicate that a function/class should remain native (i.e. not "pyscript") so that it can be called from other native (pure python) code?
As an example of what I mean, in the below code, I'd much prefer to define PyscriptWatchdogEventHandler
directly in watchdog.py
with some kind of decorator on it to indicate that it shouldn't be "pyscriptified".
https://gist.github.com/dlashua/f7d88f9a5afdcf7af17ce24266925a0b
Related Question: The purpose of the above code is to automatically reload pyscript files when they change (because I'm lazy). I use an input_boolean to indicate this functionality should be enabled that I can turn off when I'm not developing to save resources. Have I missed a situation that could occur and leave me with memory leaks or other unintended effects? Is there a better way to do this?