Replies: 2 comments 4 replies
-
|
Technically speaking:
In short, all I am saying is that there are ways to achieve the idea of a shared env already but of course this requires examples and documentation but it's possible, except for the Any other approach requires a lot of tweaks in the polyscript module but hell yeah if I think those convoluted tweaks are cool and needed indeed! |
Beta Was this translation helpful? Give feedback.
-
|
A related question came up organically in response to @sadukie's talk at PyOhio 2023 - "If I define functions and data and stuff in my script, are they available in the [editor]?" As you say Andrea, there's API/UX considerations here, but the theme of "I want to write code in a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Jotting these ideas down after @WebReflection and I had a chat where such ideas were proposed and initially explored. Our conclusion: ask folks for feedback for future refinement or rejection of the idea.
Currently we have no way for the Python terminal, Python editor or Python scripts to share the same environment.
A use case for why this is useful:
I am a teacher who has a Python script that does a bunch of important things. I want my students to be able to explore the state of the universe once the script has finished executing. The two ways of interactively working with PyScript are (as of time of writing) the terminal (
<script type="py" terminal worker>import code; code.interact()</script>) and py-editor (<script type="py-editor">...</script>). I want my students to use one (or both?) of these methods to interact with the resulting state of the universe after the script has finished executing.Questions:
terminalis blocking because it's waiting oninputcan you also run code from apy-editorgiven they're sharing the same worker context)Ideas, constructive critique and discussion most welcome..!
Beta Was this translation helpful? Give feedback.
All reactions