Note
This documentation is for a development version of IPython. There may be significant differences from the latest stable release (1.2.1).
A base class for a configurable application.
Authors:
Bases: exceptions.Exception
Bases: logging.Formatter
Formatter with additional highlevel record
This field is empty if log level is less than highlevel_limit, otherwise it is formatted with self.highlevel_format.
Useful for adding ‘WARNING’ to warning messages, without adding ‘INFO’ to info, etc.
Bases: IPython.config.configurable.SingletonConfigurable
A singleton application with full configuration support.
flatten flags and aliases, so cl-args override as expected.
This prevents issues such as an alias pointing to InteractiveShell, but a config file setting the same trait in TerminalInteraciveShell getting inappropriate priority over the command-line arg.
Only aliases with exactly one descendent in the class list will be promoted.
generate default config file from Configurables
Do the basic steps to configure me.
Override in subclasses.
Initialize a subcommand with argv.
Launch a global instance of this Application
If a global instance already exists, this reinitializes and starts it
Load config files by filename and path.
Parse the command line arguments.
Print the alias part of the help.
Print the application description.
Print usage and examples.
This usage string goes at the end of the command line help string and should contain examples of the application’s usage.
Print the flag part of the help.
Print the help for each Configurable class in self.classes.
If classes=False (the default), only flags and aliases are printed.
Print the subcommand part of the help.
Print the version string.
Start the app mainloop.
Override in subclasses.
Fire the traits events when the config is updated.
Method decorator for catching invalid config (Trait/ArgumentErrors) during init.
On a TraitError (generally caused by bad config), this will print the trait’s message, and exit the app.
For use on init methods, to prevent invoking excepthook on invalid input.
Helper for building basic –trait, –no-trait flags.
Parameters: | name : str
configurable : str
set_help : unicode
unset_help : unicode
|
---|---|
Returns: | cfg : dict
|