[IPython-dev] Docstrings for magic functions

Arnaud Gardelein agardelein at yahoo.fr
Sun Jun 19 17:14:34 EDT 2011


Thanks Thomas for the tip. I will implement an alias to pinfo.

Arnaud.

Le dimanche 19 juin 2011 à 19:02 +0100, Thomas Kluyver a écrit :
> On 19 June 2011 17:09, Arnaud Gardelein <agardelein at yahoo.fr> wrote:
>         Hi,
>         
>         I'm Arnaud, new to this mailing list but using ipython since a
>         little
>         more than a year now. I really like IPython features and
>         decided to
>         write an application on top of it, oscopy, a kind of
>         oscilloscope to
>         view electrical simulation results (oscopy.org).
>         
>         It consist of a framework and an application that use heavily
>         magic
>         functions to facilitate the access to framework functions. I
>         have
>         documented those functions with docstrings, that can be
>         displayed by
>         typing %magic_name?, for the user it would be simpler to use
>         'help
>         magic_name'. For instance I have tried to do 'help lsmagic'
>         but of
>         course lsmagic is not defined in global scope.
>         Is there a way have this working ?
> 
> Hi Arnaud,
> 
> You can already call 'pinfo lsmagic', which works as you'd describe.
> pinfo is short for print information. If magic calls are very
> important to your application, it should be possible for you to make
> 'help' an alias for pinfo. Then again, I prefer to type 'lsmagic?'
> rather than 'help lsmagic'.
> 
> Thanks,
> Thomas
> 





More information about the IPython-dev mailing list