File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -701,13 +701,16 @@ def _ipython_display_(self, **kwargs):
701
701
"""Called when `IPython.display.display` is called on the widget."""
702
702
if self ._view_name is not None :
703
703
704
+ plaintext = repr (self )
705
+ if len (plaintext ) > 110 :
706
+ plaintext = plaintext [:110 ] + '…'
704
707
# The 'application/vnd.jupyter.widget-view+json' mimetype has not been registered yet.
705
708
# See the registration process and naming convention at
706
709
# http://tools.ietf.org/html/rfc6838
707
710
# and the currently registered mimetypes at
708
711
# http://www.iana.org/assignments/media-types/media-types.xhtml.
709
712
data = {
710
- 'text/plain' : repr ( self ) ,
713
+ 'text/plain' : plaintext ,
711
714
'application/vnd.jupyter.widget-view+json' : {
712
715
'version_major' : 2 ,
713
716
'version_minor' : 0 ,
You can’t perform that action at this time.
0 commit comments