[IPython-user] Magic function not found

Fernando Perez Fernando.Perez at colorado.edu
Mon Jun 20 17:01:35 CDT 2005


Chanchal G wrote:
> Not much joy. Here's the log immediately after deleting .ipython  

Quite the opposite, MUCH joy.  This is precisely why you should _ALWAYS_ 
  post an actual screen log, as opposed to a paraphrased description of 
what happens.

In [3]: %pdoc(Exception)
ERROR: Magic function `pdoc(Exception)` not found.

In [4]: %pdoc Exception
Class Docstring:
     Common base class for all exceptions.
Constructor Docstring:
None


The parens are the problem here (which I saw immediately, but you failed 
to mention. since your brain filtered them out as irrelevant 
information).  Magics are meant to be more shell-like commands rather 
than functions, so they are invoked typically without parens, and they 
simply act on the input string.

I hope this helps,

f




More information about the IPython-user mailing list