Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ebe2a12d
Commit
ebe2a12d
authored
Jan 26, 1999
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Incorporate changes for patched version of ConfigParser.
parent
e6506e75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Doc/lib/libcfgparser.tex
Doc/lib/libcfgparser.tex
+8
-5
No files found.
Doc/lib/libcfgparser.tex
View file @
ebe2a12d
...
...
@@ -17,7 +17,7 @@ The configuration file consists of sections, lead by a
with continuations in the style of
\rfc
{
959
}
. The optional values
can contain format strings which refer to other values in the same
section, or values in a special
\code
{
DEFAULT
}
section. Additional
defaults can
provided upon instantiation of the class
.
defaults can
be provided upon initialization and retrieval
.
For example:
...
...
@@ -29,7 +29,9 @@ would resolve the \samp{\%(dir)s} to the value of dir. All reference
expansions are done late, on demand.
Intrinsic defaults can be specified by passing them into the
\class
{
ConfigParser
}
constructor as a dictionary.
\class
{
ConfigParser
}
constructor as a dictionary. Additional defaults
may be passed into the
\method
{
get
}
method which will override all
others.
\begin{classdesc}
{
ConfigParser
}{
\optional
{
defaults
}}
Return a new instance of the
\class
{
ConfigParser
}
class. When
...
...
@@ -66,6 +68,7 @@ headers.
Exception raised when errors occur attempting to parse a file.
\end{excdesc}
\subsection
{
ConfigParser Objects
\label
{
ConfigParser-objects
}}
\class
{
ConfigParser
}
instances have the following methods:
...
...
@@ -91,11 +94,11 @@ Returns a list of options available in the specified \var{section}.
Read and parse a list of filenames.
\end{methoddesc}
\begin{methoddesc}
{
get
}{
section, option
\optional
{
, raw
}}
\begin{methoddesc}
{
get
}{
section, option
\optional
{
, raw
\optional
{
, vars
}
}}
Get an
\var
{
option
}
value for the provided
\var
{
section
}
. All the
\samp
{
\%
}
interpolations are expanded in the return values, based on
the defaults passed into the constructor,
unless the
\var
{
raw
}
argument is true.
the defaults passed into the constructor,
as well as the options
\var
{
vars
}
provided, unless the
\var
{
raw
}
argument is true.
\end{methoddesc}
\begin{methoddesc}
{
getint
}{
section, option
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment