[IPython-dev] Apropos for Python

Ville M. Vainio vivainio at gmail.com
Wed Dec 20 01:11:15 CST 2006


On 12/20/06, Gregory Novak <novak at ucolick.org> wrote:

> IPython.ConfigLoader.ultraTB.pydoc.__builtin__._ip.options.pylab
> and
> IPython.ConfigLoader.ultraTB.pydoc.__builtin__._ip.options.opts.pylab
>
> Is that really where I have to look to find out whether or not IPython
> was started with the pylab option?  That's even more buried than I
> thought it would be.

In interactive shell, it's:

_ip.options.pylab

In non-interactive session, it is

import IPython.ipapi
ip = IPython.ipapi.get()
print ip.options.pylab


And thanks for the submission! Still, it would be more convenient as a
magic function... see

http://ipython.scipy.org/moin/Cookbook/CustomMagic

and

http://ipython.scipy.org/moin/IpythonExtensionApi

on how to do it (it's pretty easy).

BTW, this is a bit similar to %psearch, see "%psearch?".

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'


More information about the IPython-dev mailing list