MCPcopy Create free account
hub / github.com/ipython/ipython / _repr_html_

Method _repr_html_

IPython/core/display.py:1260–1274  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1258 self._retina_shape()
1259
1260 def _repr_html_(self):
1261 if not self.embed:
1262 width = height = klass = ''
1263 if self.width:
1264 width = ' width="%d"' % self.width
1265 if self.height:
1266 height = ' height="%d"' % self.height
1267 if self.unconfined:
1268 klass = ' class="unconfined"'
1269 return u'<img src="{url}"{width}{height}{klass}/>'.format(
1270 url=self.url,
1271 width=width,
1272 height=height,
1273 klass=klass,
1274 )
1275
1276 def _repr_mimebundle_(self, include=None, exclude=None):
1277 """Return the image as a mimebundle

Callers 2

_repr_mimebundle_Method · 0.95
test_image_sizeFunction · 0.95

Calls 1

formatMethod · 0.45

Tested by 1

test_image_sizeFunction · 0.76