From 585c494da19e82a3748e3b7e61a92ddb4fa8624c 2012-06-04 03:13:58 From: Fernando Perez Date: 2012-06-04 03:13:58 Subject: [PATCH] Fix invalid attribute access in magics. --- diff --git a/IPython/core/magics/namespace.py b/IPython/core/magics/namespace.py index b9fa9b1..0ff271f 100644 --- a/IPython/core/magics/namespace.py +++ b/IPython/core/magics/namespace.py @@ -79,7 +79,7 @@ class NamespaceMagics(Magics): In [3]: %pdef urllib.urlopen urllib.urlopen(url, data=None, proxies=None) """ - self._inspect('pdef',parameter_s, namespaces) + self.shell._inspect('pdef',parameter_s, namespaces) @line_magic def pdoc(self, parameter_s='', namespaces=None): @@ -87,12 +87,12 @@ class NamespaceMagics(Magics): If the given object is a class, it will print both the class and the constructor docstrings.""" - self._inspect('pdoc',parameter_s, namespaces) + self.shell._inspect('pdoc',parameter_s, namespaces) @line_magic def psource(self, parameter_s='', namespaces=None): """Print (or run through pager) the source code for an object.""" - self._inspect('psource',parameter_s, namespaces) + self.shell._inspect('psource',parameter_s, namespaces) @line_magic def pfile(self, parameter_s=''): @@ -108,7 +108,7 @@ class NamespaceMagics(Magics): viewer.""" # first interpret argument as an object name - out = self._inspect('pfile',parameter_s) + out = self.shell._inspect('pfile',parameter_s) # if not, try the input as a filename if out == 'not found': try: