Rich Display
With
rich display, it's possible to render a
Python object in a specific format (Image, HTML, markdown etc.) in IPython.
IPython will render an object in the desired format if it exposes one of the following methods:
| REPL | Notebook | QT Console |
_repr_pretty_ | ✓ | ✓ | ✓ |
_repr_svg_ | ✗ | ✓ | ✓ |
_repr_png_ | ✗ | ✓ | ✓ |
_repr_jpeg_ | ✗ | ✓ | ✓ |
_repr_html_ | ✗ | ✓ | ✗ |
_repr_javascript_ | ✗ | ✓ | ✗ |
_repr_markdown_ | ✗ | ✓ | ✗ |
_repr_latex_ | ✗ | ✓ | ✗ |
_repr_mimebundle_ | ✗ | ? | ? |
The _ipython_display_()
method allows to take control of the display with the own side effects.