[Zconfig] Overlaying multiple config files

Moore, Paul Paul.Moore at atosorigin.com
Mon Apr 26 08:26:08 EDT 2004


I have an application suite which currently uses ConfigParser for
configuration information. The config is built up in 3 parts, from
some hard-coded defaults, then from a suite-specific ini file
(suite.ini) and then from a further application-specific ini file
(app.ini). I'd like to do something similar with ZConfig, but I'm not
clear how to.

Defaults are easy - these can be added to the schema. But I can't see
how to overlay 2 files. It looks like I probably need to call loadFile
on a loader object multiple times, but I'm not sure how.

I tried creating an explicit loader object and calling loadFile()
twice, but that seems to replace the whole config rather than merging
the two.

I'm clearly missing something, as I'd have thought this should be
reasonably easy. Can anyone help?

Thanks,
Paul.


__________________________________________________________________________
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__________________________________________________________________________



More information about the ZConfig mailing list