coatless-quarto/pyodide

[Q&A]: Possible to retain values of code written in a code cell on refresh?

Opened this issue · 4 comments

What's your question?

I would like to know if it's on the roadmap to have the ability to save the code that one writes on a pyodide-python cell.
We're considering using this extension in our class. Students would write code in the cells, and it would be nice if the changes they made in there are not lost when they load the same file again.

Thanks very much for the extension, it's really interesting.

In short, yes.

Two kinds of files we're looking at:

  1. history of all commands run.
  2. last state of active code cells.

For the when part, that'll be the infamous soon (tm).

@tomicapretto so a happy update for you... Over in {quarto-webr} I managed to knock out the logging of commands.

c.f. coatless/quarto-webr#213

So, I'll probably incorporate a similar scope into the pyodide variant sometime this week.

@coatless this is amazing, thank you very much. Anything I can do to help you?