You are viewing an older version (9.10.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.10.0 / IPython / core / oinspect / Inspector / _mime_format

function

IPython.core.oinspect:Inspector._mime_format

source: /IPython/core/oinspect.py :579

Signature

def   _mime_format ( self text : str formatter = None )  →  dict

Summary

Return a mime bundle representation of the input text.

Extended Summary

  • if formatter is None, the returned mime bundle has

    a text/plain field, with the input text. a text/html field with a <pre> tag containing the input text.

  • if formatter is not None, it must be a callable transforming the input text into a mime bundle. Default values for text/plain and text/html representations are the ones described above.

Note:

Formatters returning strings are supported but this behavior is deprecated.

Aliases

  • IPython.core.oinspect.Inspector._mime_format