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

Method object_inspect_mime

IPython/core/interactiveshell.py:1781–1794  ·  view source on GitHub ↗

Get object info as a mimebundle of formatted representations. A mimebundle is a dictionary, keyed by mime-type. It must always have the key `'text/plain'`.

(self, oname, detail_level=0)

Source from the content-addressed store, hash-verified

1779 return self.object_inspect_mime(oname, detail_level)['text/plain']
1780
1781 def object_inspect_mime(self, oname, detail_level=0):
1782 """Get object info as a mimebundle of formatted representations.
1783
1784 A mimebundle is a dictionary, keyed by mime-type.
1785 It must always have the key `'text/plain'`.
1786 """
1787 with self.builtin_trap:
1788 info = self._object_find(oname)
1789 if info.found:
1790 return self.inspector._get_info(info.obj, oname, info=info,
1791 detail_level=detail_level
1792 )
1793 else:
1794 raise KeyError(oname)
1795
1796 #-------------------------------------------------------------------------
1797 # Things related to history management

Callers 1

object_inspect_textMethod · 0.95

Calls 2

_object_findMethod · 0.95
_get_infoMethod · 0.80

Tested by

no test coverage detected