MCPcopy Index your code
hub / github.com/ipython/ipython / display

Function display

IPython/core/display_functions.py:85–287  ·  view source on GitHub ↗

Display a Python object in all frontends. By default all representations will be computed and sent to the frontends. Frontends can decide which representation is used and how. In terminal IPython this will be similar to using :func:`print`, for use in richer frontends see Jupyter n

(
    *objs,
    include=None,
    exclude=None,
    metadata=None,
    transient=None,
    display_id=None,
    raw=False,
    clear=False,
    **kwargs,
)

Source from the content-addressed store, hash-verified

83
84
85def display(
86 *objs,
87 include=None,
88 exclude=None,
89 metadata=None,
90 transient=None,
91 display_id=None,
92 raw=False,
93 clear=False,
94 **kwargs,
95):
96 """Display a Python object in all frontends.
97
98 By default all representations will be computed and sent to the frontends.
99 Frontends can decide which representation is used and how.
100
101 In terminal IPython this will be similar to using :func:`print`, for use in richer
102 frontends see Jupyter notebook examples with rich display logic.
103
104 Parameters
105 ----------
106 *objs : object
107 The Python objects to display.
108 raw : bool, optional
109 Are the objects to be displayed already mimetype-keyed dicts of raw display data,
110 or Python objects that need to be formatted before display? [default: False]
111 include : list, tuple or set, optional
112 A list of format type strings (MIME types) to include in the
113 format data dict. If this is set *only* the format types included
114 in this list will be computed.
115 exclude : list, tuple or set, optional
116 A list of format type strings (MIME types) to exclude in the format
117 data dict. If this is set all format types will be computed,
118 except for those included in this argument.
119 metadata : dict, optional
120 A dictionary of metadata to associate with the output.
121 mime-type keys in this dictionary will be associated with the individual
122 representation formats, if they exist.
123 transient : dict, optional
124 A dictionary of transient data to associate with the output.
125 Data in this dict should not be persisted to files (e.g. notebooks).
126 display_id : str, bool optional
127 Set an id for the display.
128 This id can be used for updating this display area later via update_display.
129 If given as `True`, generate a new `display_id`
130 clear : bool, optional
131 Should the output area be cleared before displaying anything? If True,
132 this will wait for additional output before clearing. [default: False]
133 **kwargs : additional keyword-args, optional
134 Additional keyword-arguments are passed through to the display publisher.
135
136 Returns
137 -------
138 handle: DisplayHandle
139 Returns a handle on updatable displays for use with :func:`update_display`,
140 if `display_id` is given. Returns :py:data:`None` if no `display_id` is given
141 (default).
142

Callers 10

display_pageFunction · 0.90
javascriptMethod · 0.90
latexMethod · 0.90
svgMethod · 0.90
htmlMethod · 0.90
markdownMethod · 0.90
_ipython_display_Method · 0.90
update_displayFunction · 0.70
displayMethod · 0.70

Calls 6

_new_idFunction · 0.85
clear_outputFunction · 0.85
publish_display_dataFunction · 0.85
_mergeFunction · 0.85
DisplayHandleClass · 0.85
getMethod · 0.80

Tested by 2

_ipython_display_Method · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…