| Trees | Indices | Help |
|---|
|
|
object --+
|
Section
An object that represents a section in a settings file.
Options can be added to a section by simply assigning a value to an
attribute:
section.foo = baz
would produce:
[section]
foo = baz
in the settings file. Options that do not exist on assignment
are created dynamcially.
Values are automatically converted to the appropriate python type.
Options that begin and end with brackets([, ]) are converted to lists,
and options that are double-quoted (") are converted to strings.
Section also recognizes booleans regardless of case, in addition to the
literals 'yes' and 'no' of any case. Except in the case of
double-quoted strings, extra white-space is trimmed, so you need not
worry. For example:
foo = bar
is equivalent to :
foo = baz
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
options Returns a dictionary of existing options |
|||
|
Inherited from |
|||
|
|||
Initialize a new section.
|
Assign a value to an option, converting types when appropriate.
|
Returns the option's value
|
|
|||
optionsReturns a dictionary of existing options
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Mon Aug 15 17:19:44 2011 | http://epydoc.sourceforge.net |