Embedding iframe from https://pythontutor.com
pip install atsphinx-pythontutor
- Register your
conf.py
.
extensions = [
...,
"atsphinx.pythontutor",
]
- Write
pythontutor
directive into your doc.
.. pythontutor::
:width: 800
items = ["a", "b", "c"]
for item in items:
print(item.upper())