[stdlib-sig] ConfigParser - parsing options with no value

M.-A. Lemburg mal at egenix.com
Thu Sep 17 22:08:23 CEST 2009


Mats Kindahl wrote:
> Hi all,
> 
> I am currently using the ConfigParser module to parse MySQL configuration files.
>  Just plain config files, nothing fancy except... options without values.
> 
> There is a number of options here that does not require a value, they are
> basically just turning on a feature. They are also common in the standard
> template files for the server. Options that are for mysqld can have a value even
> though it is not required and the option file parser will not complain, but for
> some of the client tools, values may not be given or there will be a error.
> 
> Looking at the tests of ConfigParser, I see that it is a deliberate design
> decision to not allow options without values (or I am misunderstanding
> something). Why?

Probably to provide better error reporting and avoid casual
user errors.

> Being able to parse these files without having to write a new module would be
> very valuable.

Please submit a feature request for this, ideally with patch to
the Python tracker.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Sep 17 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the stdlib-sig mailing list