"Tim Michelsen" <[EMAIL PROTECTED]> wrote

>> import myconfig
>> foo2 = myconfig.SectionFoo['second']
> This seems like reinventing what the ConfigParser 
> mdoule [1] already does.

But with the advantage that its pure python, no parsing 
needed so its both faster and avouds any string to int 
type conversions

> But to my optinion Config Parser offers the following advantage:
> - Readable
> - All are strings => no strange 'mysetting' is needed.

I'm not sure what you mean. The Python variables and dictionary 
is all strings too. mysetting is just a string...

But the choice is yours, you can use config parser to parse 
a config file into variables in a settings module or you can 
create the settings directly in the settings module.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to