MCPcopy Index your code
hub / github.com/ipython/ipython / pinfo

Method pinfo

IPython/core/oinspect.py:813–852  ·  view source on GitHub ↗

Show detailed information about an object. Optional arguments: - oname: name of the variable pointing to the object. - formatter: callable (optional) A special formatter for docstrings. The formatter is a callable that takes a string as an inpu

(
        self,
        obj,
        oname="",
        formatter=None,
        info: Optional[OInfo] = None,
        detail_level=0,
        enable_html_pager=True,
        omit_sections=(),
    )

Source from the content-addressed store, hash-verified

811 return self.format_mime(bundle)
812
813 def pinfo(
814 self,
815 obj,
816 oname="",
817 formatter=None,
818 info: Optional[OInfo] = None,
819 detail_level=0,
820 enable_html_pager=True,
821 omit_sections=(),
822 ):
823 """Show detailed information about an object.
824
825 Optional arguments:
826
827 - oname: name of the variable pointing to the object.
828
829 - formatter: callable (optional)
830 A special formatter for docstrings.
831
832 The formatter is a callable that takes a string as an input
833 and returns either a formatted string or a mime type bundle
834 in the form of a dictionary.
835
836 Although the support of custom formatter returning a string
837 instead of a mime type bundle is deprecated.
838
839 - info: a structure with some information fields which may have been
840 precomputed already.
841
842 - detail_level: if set to 1, more information is given.
843
844 - omit_sections: set of section keys and titles to omit
845 """
846 assert info is not None
847 info_b: Bundle = self._get_info(
848 obj, oname, formatter, info, detail_level, omit_sections=omit_sections
849 )
850 if not enable_html_pager:
851 del info_b["text/html"]
852 page.page(info_b)
853
854 def info(self, obj, oname="", info=None, detail_level=0) -> InfoDict:
855 """Compute a dict with detailed information about an object.

Callers

nothing calls this directly

Calls 2

_get_infoMethod · 0.95
pageMethod · 0.80

Tested by

no test coverage detected