Open skwde opened 1 month ago
Unfortunately, that magic doesn't emit anything: see the keep-ipynb: true
output. So there's nothing Quarto can do about it.
@cscheid, not quite sure I get what the problem is here.
In any case, using %psource
as above in ipython
or in a jupyter-notebook
shows the function definition.
I believe this is the same issue as
And this relates to nbconvert
execution of notebook having no output for the cell magic.
If you do the following
quarto render
on the ipynb source, then the prior execution results will stay and you'll get output. --execute
flag, quarto will use nbconvert and you won't get any. To mimic this you can do
quarto convert index.qmd
jupyter nbconvert --to notebook --execute index.ipynb
you can reproduce the problem.
So possibly a nbconvert issue.
Bug description
Output of cell magics is ignored (in some cases).
Note, in some cases the output is shown, e.g. when using
memory_profiler
's%memit
. I guess it depends on how the magic is implemented.Steps to reproduce
Use
test.qmd
with contentExpected behavior
The output of the
%psource
magic should be displayed as it is in the jupyter notebook.I.e. I expect to see
Actual behavior
%psource
output is not displayedYour environment
Quarto check output