Re: loading configuration files that are themselves python

2010-07-29 Thread Jean-Michel Pichavant
Ben Finney wrote: Lawrence D'Oliveiro writes: In message <7j8w5tylmw@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

Re: loading configuration files that are themselves python

2010-07-23 Thread Ben Finney
Lawrence D'Oliveiro writes: > In message <7j8w5tylmw@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

Re: loading configuration files that are themselves python

2010-07-23 Thread Lawrence D'Oliveiro
In message <7j8w5tylmw@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? -- http://mail.python.org/mailman/listinfo/python-

Re: loading configuration files that are themselves python

2010-07-03 Thread Terry Reedy
On 7/3/2010 5:15 AM, Matthew Vernon wrote: Hi, Is there a more idiomatic way of loading in a configuration file that's python code than: _temp=__import__(path,fromlist='cachestrs') cachestrs=_temp.cachestrs ? I mean, that's pretty ugly...Plain "import" doesn't work in this case because 'path'

Re: loading configuration files that are themselves python

2010-07-03 Thread Matthew Vernon
Peter Otten <__pete...@web.de> writes: > Matthew Vernon wrote: > > > Is there a more idiomatic way of loading in a configuration file > > that's python code than: > > > > _temp=__import__(path,fromlist='cachestrs') > > cachestrs=_temp.cachestrs > > > > ? I mean, that's pretty ugly...Plain "impo

Re: loading configuration files that are themselves python

2010-07-03 Thread Bruno Desthuilliers
Matthew Vernon a écrit : > Hi, > > Is there a more idiomatic way of loading in a configuration file > that's python code than: > > _temp=__import__(path,fromlist='cachestrs') > cachestrs=_temp.cachestrs > > ? I mean, that's pretty ugly...Plain "import" doesn't work in this > case because 'path'

Re: loading configuration files that are themselves python

2010-07-03 Thread Peter Otten
Matthew Vernon wrote: > Is there a more idiomatic way of loading in a configuration file > that's python code than: > > _temp=__import__(path,fromlist='cachestrs') > cachestrs=_temp.cachestrs > > ? I mean, that's pretty ugly...Plain "import" doesn't work in this > case because 'path' is a variab

loading configuration files that are themselves python

2010-07-03 Thread Matthew Vernon
Hi, Is there a more idiomatic way of loading in a configuration file that's python code than: _temp=__import__(path,fromlist='cachestrs') cachestrs=_temp.cachestrs ? I mean, that's pretty ugly...Plain "import" doesn't work in this case because 'path' is a variable defined elsewhere TIA, Matthe