quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.77k stars 309 forks source link

Allow live coding in presentations (e.g. with pyscript) #6188

Open joelostblom opened 1 year ago

joelostblom commented 1 year ago

Quarto looks like a powerful tool for creating presentations. One useful thing when presenting code would be to be able to change and re-execute the code shown directly in the slide (like how RISE works for Jupyter Notebooks). I saw that there is an independent project for this via WebR, is there any interest to use pyscript/pyodide to achieve this for python as well?

cderv commented 1 year ago

There is a related discussion on using thebe (https://thebe.readthedocs.io/) to offer running R chunk interactively

This is still an experiment on my side so nothing yet to share.

Regarding pyodide, there is a shinylive quarto extension (https://github.com/quarto-ext/shinylive) that leverages shinylive (https://shiny.rstudio.com/py/docs/shinylive.html) which runs Shiny App in Browser using pyodide. So maybe something that can be generalized from that 🤔

joelostblom commented 1 year ago

Thanks for the reply @cderv, it would be great if something could be generalized from shinylive. I addition to rise, there is also jupyter lite and its sphinx extension which allows me to build really helpful websites with interactive coding elements when I use jupyter book and it would be great to have similar functionality in quarto

jjallaire commented 1 year ago

Yes, I'm really hopeful that Thebe will be a great solution for this!

MarcSkovMadsen commented 8 months ago

Just for reference. I'm using PyScript with Quarto here https://awesome-panel.github.io/holoviz-quarto/example-pyscript.html.

coatless commented 7 months ago

An equivalent interactive code cell for Python (using Pyodide) is now available here:

https://github.com/coatless-quarto/pyodide