| Home | Trees | Index | Help |
|
|---|
|
|
object --+ | Container --+ | Mapping --+ | Config
| Method Summary | |
|---|---|
| __init__(self,
streamOrFile,
parent)
Initializes an instance. | |
| addNamespace(self,
ns,
name)
Add a namespace to this configuration which can be used to evaluate (resolve) dotted-identifier expressions. | |
| any | getByPath(self,
path)
Obtain a value in the configuration via its path. |
| load(self,
stream)
Load the configuration from the specified stream. | |
| removeNamespace(self,
ns,
name)
Remove a namespace added with addNamespace. | |
| save(self,
stream,
indent)
Save this configuration to the specified stream. | |
| Inherited from Mapping | |
| __contains__(self, item) | |
| __delitem__(self,
key)
Remove an item | |
| __getattr__(self, key) | |
| __getattribute__(self, name) | |
| __getitem__(self, key) | |
| __iter__(self) | |
| __len__(self) | |
| __repr__(self) | |
| __setattr__(self, name, value) | |
| __setitem__(self, name, value) | |
| __str__(self) | |
| addMapping(self,
key,
value,
comment,
setting)
Add a key-value mapping with a comment. | |
| get(self,
key,
default)
Allows a dictionary-style get operation. | |
| iteritems(self) | |
| iterkeys(self) | |
| keys(self)
Return the keys in a similar way to a dictionary. | |
| writeToStream(self,
stream,
indent,
container)
Write this instance to a stream at the specified indentation level. | |
| Inherited from Container | |
| evaluate(self,
item)
Evaluate items which are instances of Reference or Expression. | |
| setPath(self,
path)
Set the path for this instance. | |
| writeValue(self, value, stream, indent) | |
| Inherited from object | |
| __delattr__(...)
x.__delattr__('name') <==> del x.name | |
| __hash__(x)
Return hash(x)... | |
| __new__(T,
S,
...)
Return a new object with type S, a subtype of T... | |
| __reduce__(...)
helper for pickle | |
| __reduce_ex__(...)
helper for pickle | |
| Instance Variable Summary | |
|---|---|
| Inherited from Container | |
| path: A string which describes how to get to this instance from the root of the hierarchy. | |
| Class Variable Summary | |
|---|---|
| type | Namespace = config.Namespace |
| Method Details |
|---|
__init__(self,
streamOrFile=None,
parent=None)
Initializes an instance.
|
addNamespace(self, ns, name=None)Add a namespace to this configuration which can be used to evaluate (resolve) dotted-identifier expressions.
|
getByPath(self, path)Obtain a value in the configuration via its path.
|
load(self, stream)Load the configuration from the specified stream. Multiple streams can be used to populate the same instance, as long as there are no clashing keys. The stream is closed.
|
removeNamespace(self, ns, name=None)Remove a namespace added with addNamespace.
|
save(self, stream, indent=0)Save this configuration to the specified stream. The stream is closed if this is the top-level configuration in the hierarchy. Mapping.save is called to do all the work.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Wed Mar 03 20:02:21 2010 | http://epydoc.sf.net |