Hello How could I retrieve the path to the config file used to start a running instance? I want to put other config stuff in the same directory, and I would like a safe way to obtain such directory. I could use INSTANCE_HOME/etc but since the config file name can be specified in the command line, it might not be there. Gabriel Genellina Softlab SRL
On 1/13/06, Gabriel Genellina <gagenellina@softlab.com.ar> wrote:
How could I retrieve the path to the config file used to start a running instance? I want to put other config stuff in the same directory, and I would like a safe way to obtain such directory. I could use INSTANCE_HOME/etc but since the config file name can be specified in the command line, it might not be there.
If you're using Zope 2.9, the configuration schema allows adding additional sections. Documentation still needs to be written (unless someone snuck it in while I wasn't looking), but information can be found in the main configuration schema in lib/python/Zope2/Startup/zopeschema.xml. That would get around the location issue, and let you add configuration settings so you can refer to additional data files as well, if any are needed. Explicit references beat implicit sniffing of location! -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> "There is no wealth but life." --John Ruskin
participants (2)
-
Fred Drake -
Gabriel Genellina