ConfigParser and .ini files

jim kraai jkraai at murl.com
Mon Jan 24 04:48:27 EST 2000


"Fred L. Drake, Jr." wrote:
> 
> super_banane at yahoo.com writes:
>  > The ConfigParser class in the default Python libraries
>  > does not support comments given on the value lines, separated
>  > by a semicolon, such as:
>  >
>  > [Section]
>  > keyword = value ; put your comments here
> 
>   You're right, it doesn't.
>   Does anyone know of a *real* specification for the .ini format?  I
> didn't know this was allowed.

Reference to a *real* spec and why specs are invalid can be found in the 
first paragraph of the "Introduction" at:
http://www.cloanto.com/specs/ini.html

XML.com has some (surprise!) regexp-based .ini parsing Perl code at:
http://www.xml.com/pub/norm/part1/getstart1.html

If you read TCL, an .ini manager (looks slow-as-can-be) can be found at:
http://waster.8m.com/iniparse/

--jim




More information about the Python-list mailing list