[Fwd: Re: ConfigParser question]

kim kim at ypsilon.net
Wed Jan 15 00:34:30 EST 2003


Hi,

i think there is something wrong:

[dirs]
recursive = /home/cmolina
recursive = /etc
recursive = /tmp/usr

shouldn't it be:

[dirs]
recursive:/home/cmolina
recursive:/etc
recursive:/tmp/usr

i don't know if the other method works to, but i use the second one very often and it works.

best regards

Andy

-----Weitergeleitete Nachricht-----


From: Gillou <nospam at bigfoot.com>
To: python-list at python.org
Subject: Re: ConfigParser question
Date: 14 Jan 2003 23:30:07 +0100

"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



-- 
http://mail.python.org/mailman/listinfo/python-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20030115/de8fa514/attachment.html>


More information about the Python-list mailing list