We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c18ef2 commit 6ed1eb7Copy full SHA for 6ed1eb7
1 file changed
streamz/core.py
@@ -336,7 +336,7 @@ def __str__(self):
336
def _ipython_display_(self, **kwargs):
337
try:
338
from ipywidgets import Output
339
- import IPython
+ from IPython.core.interactiveshell import InteractiveShell
340
except ImportError:
341
if hasattr(self, '_repr_html_'):
342
return self._repr_html_()
@@ -350,8 +350,11 @@ def update_cell(val):
350
if output is None:
351
return
352
with output:
353
- IPython.display.clear_output(wait=True)
354
- IPython.display.display(val)
+ content, *_ = InteractiveShell.instance(
+ ).display_formatter.format(val)
355
+ output.outputs = ({'output_type': 'display_data',
356
+ 'data': content,
357
+ 'metadata': {}},)
358
359
s = self.map(update_cell)
360
_html_update_streams.add(s)
0 commit comments