On Friday 07 December 2001 06:05 am, Geoffrey Talvola wrote:
> As far as naming conventions, these are valid Python
> modules/packages, so .py would probably be best. But it would be
> nice to be able to identify config files from their filename, so it
> could look like this for a multiple-file configuration:
>
> Configs/
> __init__.py
> AppServerConfig.py
> ApplicationConfig.py
> ...
What's the __init__.py for? In other projects I just went with:
Configs/
FooBar.config
and did an exec on FooBar to get the variables which looked like:
reps = 50
names = 'foo bar'.split()
etc.
We definitely have to be able to distinguish the file as install.py
does things with config files (which will change in nature in the
future, but still be a requirement).
The plan I was changing for Configurable was simply to do an exec,
unless the first char was a {, in which case I would do an eval.
-Chuck