lightweight human-readable config?
Ville Vainio
ville.spammehardvainio at spamtut.fi
Thu Oct 30 04:41:28 EST 2003
Maxim Khesin <max at cNvOiSsiPoAnMtech.com> writes:
> I want to have a config file with my python proggie, satisfying the
> following requirements:
I usually use plain old python modules for configuration. If you don't
want to use 'import' and a name ending with .py, just exec the module
in some namaspace. You can do "default value" behaviour by execing
some default value module in the same namespace (often you might want
to parse /etc/fooconfig before ~/.fooconfig). Then you just harvest
the namespace for the config data.
--
Ville Vainio http://www.students.tut.fi/~vainio24
More information about the Python-list
mailing list