[Zconfig] Order of Import?

Chris Withers chris at simplistix.co.uk
Tue Jul 6 03:49:06 EDT 2004


Hi All,

I have a ZConfig schema which has a Zope.conf path as one of its config. 
options. It also has some options that are dotted strings that get imported as 
modules, for example:

zope_config $HOME\etc\zope.conf

<command>
   module    mypackage.mymodule
   frequency 1
</command>

Now, the datatype I was using for the module key is very closely based on the 
ZConfig.datatypes.Registry.search method. The problems is, that 
mypackage.mymodule contains some imports along the lines of:

from Products.MyProduct.MyModule import MyProductClass

...which currently barfs.

The reason being that the datatype handlers for module gets called before that 
of zope_config, and it's the handler for the zope_config datatype that does the:
     Zope.configure(configPath)
     return Zope.app()
...dance.

How can I tell ZConfig to process the zope_config key before it attempts to 
process any command keys?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the ZConfig mailing list