[IPython-dev] Add new commandline option from profile

Arnaud Gardelein arnaud@oscopy....
Sat Jun 2 13:45:44 CDT 2012


Hi all,

The new ipython configuration system allows to customize for particular
application three classes, InteractiveShell, PrefilterManager and
AliasManager all subclasses of Configurable as described in the
documentation. Each option from those classes are settable from argument
of ipython command.
Assuming a new configurable object described in a ipython 'foo' profile:

from IPython.config.configurable import Configurable
from IPython.utils.traitlets import Int, Float, Unicode, Bool
class Foo(Configurable):
    name = Unicode(u'Foo')
    bar = Bool(False, config=True)

How to make the boolean 'bar' also an argument settable from ipython
command with a '--bar' or '--no-bar' when invoking ipython
--profile=foo?

Thanks,

Arnaud.



More information about the IPython-dev mailing list