jupyter / jupyter-sphinx

Sphinx extension for rendering of Jupyter interactive widgets.
https://jupyter-sphinx.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
187 stars 65 forks source link

Output of `?` or `??` is not displayed #194

Closed Peque closed 2 years ago

Peque commented 2 years ago

In IPython, you can use ? or ?? to display information about the object like the docstring, signature and type:

In [2]: print??
Docstring:
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)

Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file:  a file-like object (stream); defaults to the current sys.stdout.
sep:   string inserted between values, default a space.
end:   string appended after the last value, default a newline.
flush: whether to forcibly flush the stream.
Type:      builtin_function_or_method

However, in Jupyter this information is rendered in a box at the bottom instead of bellow the code cell.

Screenshot from 2022-01-16 20-24-57

This means code like this:

.. jupyter-execute::

    print??

Will not render any output in the documentation.

Is this expected? Would it make sense to implement support for showing this type of information bellow the code cell in the documentation?

akhmerov commented 2 years ago

This is a duplicate of #193, which is in turn an upstream issue https://github.com/jupyter/nbclient/issues/196