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

Method psource

IPython/core/magics/namespace.py:94–98  ·  view source on GitHub ↗

Print (or run through pager) the source code for an object.

(self, parameter_s='', namespaces=None)

Source from the content-addressed store, hash-verified

92
93 @line_magic
94 def psource(self, parameter_s='', namespaces=None):
95 """Print (or run through pager) the source code for an object."""
96 if not parameter_s:
97 raise UsageError('Missing object name.')
98 self.shell._inspect('psource',parameter_s, namespaces)
99
100 @line_magic
101 def pfile(self, parameter_s='', namespaces=None):

Callers

nothing calls this directly

Calls 2

UsageErrorClass · 0.90
_inspectMethod · 0.80

Tested by

no test coverage detected