[PEAK] runIni => ZConfig revisited
John Landahl
john at landahl.org
Fri Nov 14 05:55:40 EST 2003
In re-reading the message at
<http://www.eby-sarna.com/pipermail/peak/2003-July/000589.html>, and with
the recently acquired knowledge of config.loadConfigFile(), it occurred to
me that one could have a key in a ZConfig-based config setup a list of
extra files for the application to load at startup. Something like this
(untested):
class MyApp(AbstractCommand):
configFiles = binding.Make(list)
def __loadConfig(self):
for file in self.configFiles:
config.loadConfigFile(self, file)
__loadConfig = binding.Make(__loadConfig, uponAssembly=True)
The main (ZConfig-based) file might then look like:
Config foo-bar.ini
Config more-options.ini
Does this seem reasonable?
_jpl_
More information about the PEAK
mailing list