You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thonny IDE allows testing local scripts without saving them to the device first -- when the user selects "Run" command, the code will be submitted to the raw (or paste mode) REPL.
Before this it tries to clear the environment (in order to not depend on the state from previous commands). With a MicroPython device it simply orders soft-reboot in the raw mode, which disables running main.py. With CircuitPython this can't be used, so it simply soft-reboots and tries to interrupt code.py as quickly as possible. (Yes, this is far from elegant.)
CP 7.0 introduced supervisor.set_next_code_file, but it looks like this is not helpful here, as set_next_code_file(None) simply restores the default behavior.
My request: please consider adding a way for reloading the VM without executing code.py, for example:
by introducing supervisor.reload_to_repl()
or by making supervisor.set_next_code_file("") skip running scripts after reload
or (preferably) by following MicroPython's policy of not running the main script if Ctrl-D is sent at the raw REPL.
The text was updated successfully, but these errors were encountered:
Thonny IDE allows testing local scripts without saving them to the device first -- when the user selects "Run" command, the code will be submitted to the raw (or paste mode) REPL.
Before this it tries to clear the environment (in order to not depend on the state from previous commands). With a MicroPython device it simply orders soft-reboot in the raw mode, which disables running main.py. With CircuitPython this can't be used, so it simply soft-reboots and tries to interrupt code.py as quickly as possible. (Yes, this is far from elegant.)
CP 7.0 introduced
supervisor.set_next_code_file
, but it looks like this is not helpful here, asset_next_code_file(None)
simply restores the default behavior.My request: please consider adding a way for reloading the VM without executing code.py, for example:
supervisor.reload_to_repl()
supervisor.set_next_code_file("")
skip running scripts after reloadThe text was updated successfully, but these errors were encountered: