Recommended "new" way for config files

Peter vmail at mycircuit.org
Fri Jan 8 14:29:35 EST 2010


On 01/08/2010 03:57 PM, r0g wrote:
> Chris Rebert wrote:
>    
>> On Thu, Jan 7, 2010 at 10:19 AM, Peter<vmail at mycircuit.org>  wrote:
>> <snip>
>>      
>>>> The .ini file is the simpliest solution, at least from the user point of
>>>> view, no need to learn any python syntax.
>>>>          
>>> I am speaking from the point of view of a python programmer, and I find the
>>> .ini restrictions not necessarily simple, for example when dealing with
>>> structured data (I suppose it is trivial to specify a dictionnary or a list
>>> for the purpose of my request) For example, configuration files for the
>>> logging module get unwieldy when you specify several loggers , handlers,
>>> formatters etc, because you have to break down structured data ( objects )
>>> to name,value pairs.
>>>        
>> <snip>
>>      
>>> So what is the "worshipped" approach, when you need more than name=value
>>> pairs ?
>>>        
>> JSON is one option: http://docs.python.org/library/json.html
>>
>> Cheers,
>> Chris
>> --
>> http://blog.rebertia.com
>>      
>
> Yes, JSON is rapidly becoming a standard for stuff like this as it's
> widely portable and less bulky than XML. It's the native format for
> couchdb too which is nice if you want to replicate and share the
> contents of your documents.
>
> Roger.
>    
Excellent, thanks , have to check that out. Any experience with yaml 
<http://yaml.org/> ?
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100108/5db9f84c/attachment-0001.html>


More information about the Python-list mailing list