2019-07-15 jupyter_sphinx¶
jupyter_sphinx was recently updated and now includes a directive which lets the user run a piece of code and even modify it before running.
This kind of complex possibility still surprises me. There must be a machine somewhere set up to run something, similar to binder.
.. jupyter-execute::
n = 1
for i in range(1, 10):
n *= i
print('i!=%d' % n)
Apparently, a button must be added to the page…
.. thebe-button:: Optional title
Which gives:
Let’s see if this page works. I don’t see a free website running python for ever… Anyway, it seems to work very slowly on my first try or not to work. The page was waiting for the kernel for ever.