Keepin constants, configuration values, etc. in Python - dedicated module or what?

cl at isbd.net cl at isbd.net
Tue Sep 30 13:30:11 EDT 2014


Rustom Mody <rustompmody at gmail.com> wrote:
> 
> > # docs for first option
> > # more docs
> > # examples
> > # etcetera
> > first_option =123
> 
> > # docs for second option
> > second_option = 234
> 
> > Is that Python code, or is it a sectionless INI file, or what?
> 
> Yeah I was going to say that this is possible
> 
> > There's  no difference.
> 
> But there is! Its code that looks like data.
> 
The main trouble with this approach is that I need some way to have
the python/config file available at the 'home' end of this as well as
at the 'remote' end.  I guess I could write a copy of the file into
the database but then I have the editing issue again, changing it
becomes messy.  If it's not in the database then how do I 'tie' it to
the data?

-- 
Chris Green
·



More information about the Python-list mailing list