Trees | Indices | Help |
|
---|
{
'
0
'
:
False,
'
1
'
:
True,
'
false
'
:
False,
'
no
'
...
re.compile(r'\[(?P<
header
>
[^
\]]
+
)
\]')
re.compile(r'(?P<
option
>
[
^
:=\s]
[
^
:=]
*
)
\s*
(?P<
vi
>
[
:=]
)
...
Create a new section in the configuration.
Raise DuplicateSectionError if a section by the specified name already exists.
Indicate whether the named section is present in the configuration.
The DEFAULT section is not acknowledged.
Read and parse a filename or a list of filenames.
Files that cannot be opened are silently ignored; this is designed so that you can specify a list of potential configuration file locations (e.g. current directory, user's home directory, systemwide directory), and all existing configuration files in the list will be read. A single filename may also be given.
Return list of successfully read files.
Like read() but the argument must be a file-like object.
The `fp' argument must have a `readline' method. Optional second argument is the `filename', which if not given, is taken from fp.name. If fp has no `name' attribute, `<???>' is used.
Parse a sectioned setup file.
The sections in setup file contains a title line at the top, indicated by a name in square brackets (`[]'), plus key/value options lines, indicated by `name: value' format lines. Continuations are represented by an embedded newline then leading whitespace. Blank lines, lines beginning with a '#', and just about everything else are ignored.
{
'
0
'
:
False,
'
1
'
:
True,
'
false
'
:
False,
'
no
'
:
False,
'
off
'
:
False,
'
on
'
:
True,
'
true
'
:
True,
'
yes
'
:
True}
re.compile(r'(?P<
option
>
[
^
:=\s]
[
^
:=]
*
)
\s*
(?P<
vi
>
[
:=]
)
\s*
(?P<
value
>
.*
)
$\ ')
Trees | Indices | Help |
|
---|