Inheritance diagram for IPython.core.shellapp:
A mixin for Application classes that launch InteractiveShell instances, load extensions, etc.
Bases: IPython.config.configurable.Configurable
A Mixin for applications that start InteractiveShell instances.
Provides configurables for loading extensions and executing files as part of configuring a Shell environment.
The following methods should be called by the initialize() method of the subclass:
- init_path()
- init_shell() (to be implemented by the subclass)
- init_gui_pylab()
- init_extensions()
- init_code()
Create a configurable given a config config.
Parameters : | config : Config
|
---|
Notes
Subclasses of Configurable must call the __init__() method of Configurable before doing anything else and using super():
class MyConfigurable(Configurable):
def __init__(self, config=None):
super(MyConfigurable, self).__init__(config)
# Then any other code you need to finish initialization.
This ensures that instances will be configured properly.
Get the config class config section
Get the help string for this class in ReST format.
If inst is given, it’s current trait values will be used in place of class defaults.
Get the help string for a single trait.
If inst is given, it’s current trait values will be used in place of the class default.
Get the help string for a single trait and print it.
Get a list of all the names of this classes traits.
This method is just like the trait_names() method, but is unbound.
Get a list of all the traits of this class.
This method is just like the traits() method, but is unbound.
The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.
This follows the same algorithm as traits does and does not allow for any simple way of specifying merely that a metadata name exists, but has any value. This is because get_metadata returns None if a metadata key doesn’t exist.
A trait for unicode strings.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
An instance of a Python list.
An instance of a Python list.
An instance of a Python list.
An instance of a Python list.
A trait for unicode strings.
A trait for unicode strings.
An enum of strings that are caseless in validate.
run the pre-flight code, specified via exec_lines
Load all IPython extensions in IPythonApp.extensions.
This uses the ExtensionManager.load_extensions() to load all the extensions listed in self.extensions.
Enable GUI event loop integration, taking pylab into account.
Add current working directory, ‘’, to sys.path
A trait for unicode strings.
Setup a handler to be called when a trait changes.
This is used to setup dynamic notifications of trait changes.
Static handlers can be created by creating methods on a HasTraits subclass with the naming convention ‘_[traitname]_changed’. Thus, to create static handler for the trait ‘a’, create the method _a_changed(self, name, old, new) (fewer arguments can be used, see below).
Parameters : | handler : callable
name : list, str, None
remove : bool
|
---|
An enum of strings that are caseless in validate.
A boolean (True, False) trait.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Get metadata values for trait by key.
Get a list of all the names of this classes traits.
Get a list of all the traits of this class.
The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.
This follows the same algorithm as traits does and does not allow for any simple way of specifying merely that a metadata name exists, but has any value. This is because get_metadata returns None if a metadata key doesn’t exist.
Fire the traits events when the config is updated.