ConfigParser question

Gillou nospam at bigfoot.com
Tue Jan 14 17:30:07 EST 2003


"Carlos Molina" <cmolina at net-uno.net> a écrit dans le message de news:
mailman.1042566386.23438.python-list at python.org...
> Greetings
>
> I'm new to python (i come from perl) and I am doing a little program...
> My question is with ConfigParser class..
>
> If I have the following conf file
>
> [dirs]
> recursive = /home/cmolina
> recursive = /etc
> recursive = /tmp/usr
>

You should not give the same name to various variables (recursive) within
the same section.

Alternative :
===
...
[dirs]
recursive = /home/cmolina /etc /tmp/usr
                  /somewhere/else
...
===

And then split the config.get('dirs', 'recursive')

Cheers

--Gilles







More information about the Python-list mailing list