loading configuration files that are themselves python

Jean-Michel Pichavant jeanmichel at sequans.com
Thu Jul 29 05:35:05 EDT 2010


Ben Finney wrote:
> Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> writes:
>
>   
>> In message <7j8w5tylmw.fsf at rapun.sel.cam.ac.uk>, Matthew Vernon wrote:
>>
>>     
>>> Is there a more idiomatic way of loading in a configuration file
>>> that's python code ...
>>>       
>> Is it really a good idea to have a configuration language that’s Turing-
>> complete?
>>     
>
> I think not. Configuration files should be read as data; they should be
> declarative only, not executable languages. That way, a different
> program can read and parse them without having to be a parser for an
> entire programming language.
>   

For local non distributed applications, configuration files written in 
python are just fine.

JM




More information about the Python-list mailing list