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

Method _repr_html_

IPython/lib/display.py:266–279  ·  view source on GitHub ↗

return the embed iframe

(self)

Source from the content-addressed store, hash-verified

264 self.params = kwargs
265
266 def _repr_html_(self):
267 """return the embed iframe"""
268 if self.params:
269 try:
270 from urllib.parse import urlencode # Py 3
271 except ImportError:
272 from urllib import urlencode
273 params = "?" + urlencode(self.params)
274 else:
275 params = ""
276 return self.iframe.format(src=self.src,
277 width=self.width,
278 height=self.height,
279 params=params)
280
281class YouTubeVideo(IFrame):
282 """Class for embedding a YouTube Video in an IPython session, based on its video id.

Callers

nothing calls this directly

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected