##// END OF EJS Templates
Merge pull request #12919 from Carreau/auto-backport-of-pr-12823-on-7.x...
Matthias Bussonnier -
r26479:288ca334 merge
parent child Browse files
Show More
@@ -163,6 +163,9 b' def display(*objs, include=None, exclude=None, metadata=None, transient=None, di'
163 Set an id for the display.
163 Set an id for the display.
164 This id can be used for updating this display area later via update_display.
164 This id can be used for updating this display area later via update_display.
165 If given as `True`, generate a new `display_id`
165 If given as `True`, generate a new `display_id`
166 clear : bool, optional
167 Should the output area be cleared before displaying anything? If True,
168 this will wait for additional output before clearing. [default: False]
166 kwargs: additional keyword-args, optional
169 kwargs: additional keyword-args, optional
167 Additional keyword-arguments are passed through to the display publisher.
170 Additional keyword-arguments are passed through to the display publisher.
168
171
@@ -281,8 +284,9 b' def display(*objs, include=None, exclude=None, metadata=None, transient=None, di'
281 # Directly print objects.
284 # Directly print objects.
282 print(*objs)
285 print(*objs)
283 return
286 return
284
287
285 raw = kwargs.pop('raw', False)
288 raw = kwargs.pop("raw", False)
289 clear = kwargs.pop("clear", False)
286 if transient is None:
290 if transient is None:
287 transient = {}
291 transient = {}
288 if metadata is None:
292 if metadata is None:
@@ -306,6 +310,9 b' def display(*objs, include=None, exclude=None, metadata=None, transient=None, di'
306 if not raw:
310 if not raw:
307 format = InteractiveShell.instance().display_formatter.format
311 format = InteractiveShell.instance().display_formatter.format
308
312
313 if clear:
314 clear_output(wait=True)
315
309 for obj in objs:
316 for obj in objs:
310 if raw:
317 if raw:
311 publish_display_data(data=obj, metadata=metadata, **kwargs)
318 publish_display_data(data=obj, metadata=metadata, **kwargs)
General Comments 0
You need to be logged in to leave comments. Login now