ConfigParser: buggy or just a mess?
goodger at python.org
Fri Oct 24 22:58:11 CEST 2003
Martin Maney wrote:
> Summary: with batteries like these, get a longer extension cord?
> [most of this was written before I came across the brief explanation
> on the wiki, which did more to explain ConfigParser than everything
> in the official documentation, while inspiring the executive summary
If you can write it better, doc patches are welcome!
> <transcript from interactive session>
> Python 2.2.1 (#1, Sep 7 2002, 14:34:30)
Before complaining, check the latest version to see if the bug has
already been fixed:
Python 2.3 (#2, Jul 30 2003, 11:45:28)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ConfigParser import ConfigParser
>>> cp = ConfigParser()
>>> cp.has_option('test', 'a')
>>> cp.has_option('test', 'b')
Here's my "conf" file (next time, please include your data too):
a = 1
b = 2
David Goodger http://starship.python.net/~goodger
For hire: http://starship.python.net/~goodger/cv
(includes reStructuredText: http://docutils.sf.net/rst.html)
More information about the Python-list