sphinx-autorun
sphinx-autorun copied to clipboard
Code not shown in case of exceptions
When an exception is thrown, the code is not shown at all. This occurs in .. runblock:: pycon
blocks.
For example
.. runblock:: pycon
>>> s = (1, 2, 3)
>>> s[0] = 4
produces
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
whereas I'd like to get
>>> s = (1, 2, 3)
>>> s[0] = 4
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
Is there a way to achieve this ?
It's definitely possible, not sure how trivial it is. I can't promise anything anytime soon.
The same seems to apply when the code raises some warning
I have started using rbookdown with the python/reticulate directive instead for generating docs with snippets/output.