Inheritance diagram for IPython.core.profiledir:
An object for managing IPython profile directories.
Authors:
Bases: IPython.config.configurable.Configurable
An object to manage the profile directory and its resources.
The profile directory is used by all IPython applications, to manage configuration, logging and security.
This object knows how to find, create and manage these directories. This should be used by any code that wants to handle profiles.
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.
Get the help string for a single trait.
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 whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Copy a default config file into the active profile directory.
Default configuration files are kept in IPython.config.default. This function moves these from that location to the working profile directory.
Create a new profile directory given a full path.
Parameters : | profile_dir : str
|
---|
Create a profile dir by profile name and path.
Parameters : | path : unicode
name : unicode
|
---|
Find/create a profile dir and return its ProfileDir.
This will create the profile directory if it doesn’t exist.
Parameters : | profile_dir : unicode or str
|
---|
Find an existing profile dir by profile name, return its ProfileDir.
This searches through a sequence of paths for a profile dir. If it is not found, a ProfileDirError exception will be raised.
The search path algorithm is: 1. os.getcwdu() 2. ipython_dir
Parameters : | ipython_dir : unicode or str
name : unicode or str
|
---|
A trait for unicode strings.
A trait for unicode strings.
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
|
---|
A trait for unicode strings.
A trait for unicode strings.
A trait for unicode strings.
A trait for unicode strings.
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.