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

Method do_pfile

IPython/core/debugger.py:1024–1034  ·  view source on GitHub ↗

Print (or run through pager) the file where an object is defined. The debugger interface to %pfile.

(self, arg)

Source from the content-addressed store, hash-verified

1022 self.shell.find_line_magic("pdoc")(arg, namespaces=namespaces)
1023
1024 def do_pfile(self, arg):
1025 """Print (or run through pager) the file where an object is defined.
1026
1027 The debugger interface to %pfile.
1028 """
1029 assert self.curframe is not None
1030 namespaces = [
1031 ("Locals", self.curframe_locals),
1032 ("Globals", self.curframe.f_globals),
1033 ]
1034 self.shell.find_line_magic("pfile")(arg, namespaces=namespaces)
1035
1036 def do_pinfo(self, arg):
1037 """Provide detailed information about an object.

Callers

nothing calls this directly

Calls 1

find_line_magicMethod · 0.80

Tested by

no test coverage detected