[Tutor] The best way to implement a config file ???

Kent Johnson kent37 at tds.net
Thu Feb 1 21:39:40 CET 2007


Magnus Wirström wrote:
> / think i want win.ini style, I'm designing a configuration module that 
> is going to write this file. I have not heard of shlex so i can really 
> not judge if it suits my needs. I do like the kind of config file that 
> can be editable with a editor if nessary. Anyone have an good example 
> how to use ConfigFile to write a config file that stores strings and 
> boolean settings. Sorry for my english....

http://effbot.org/librarybook/configparser.htm

There are also a bunch of third-party modules that are supposed to be 
better than ConfigParser in some way:
http://wiki.python.org/moin/ConfigParserShootout

Kent



More information about the Tutor mailing list