From 4ced3abf00718643628b65c6ea6404558c73df8c Mon Sep 17 00:00:00 2001 From: fpliger Date: Tue, 23 Apr 2024 10:02:01 +0000 Subject: [PATCH] Deployed 07c15a2 to 2024.4.1 with MkDocs 1.6.0 and mike 1.1.2 --- 2024.4.1/user-guide/editor/index.html | 80 +++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/2024.4.1/user-guide/editor/index.html b/2024.4.1/user-guide/editor/index.html index 46ef2ec..f2b778d 100644 --- a/2024.4.1/user-guide/editor/index.html +++ b/2024.4.1/user-guide/editor/index.html @@ -580,6 +580,17 @@ + + @@ -590,6 +601,39 @@ + + + + @@ -682,6 +726,28 @@ + + + @@ -774,6 +840,20 @@

Python editor

</script> <div id="editor"></div> <!-- will eventually contain the Python editor --> +

Editor VS Terminal

+

The main difference between these two core plugins is that a py-editor, or mpy-editor, is a custom orchestration a part and editors run in workers by default, mostly to prevent accidental blocking evaluation that could otherwise freeze the main thread UI (infinite loops or similar deadlocks).

+

Because an editor is detached from the regular orchestration that happens with just py or mpy scripts, one should not expect the same behavior regular PyScript elements follow, most notably:

+ +

Still missing

+

As mentioned at the top of this section, the PyEditor is currently under further development and refinement, and it might land also as explicit custom element such as <py-editor> or <mpy-editor>, somehow simplifying the bootstrap through its content-aware element nature but right now these variants are not supported.

+

Last, but not least, we currently don't have a mechanism to destroy a terminal or kill its execution from the worker so in case of infinite loops, the easy way out is to refresh the current page so that previous worker would get killed. We will eventually provide an easier way to kill and start fresh in the future.