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

Mats Kindahl mats at sun.com
Thu Sep 17 18:53:42 CEST 2009


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?

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

Best wishes,
Mats Kindahl
-- 
Mats Kindahl
Senior Software Engineer
Database Technology Group
Sun Microsystems


More information about the stdlib-sig mailing list