[Zope3-dev] RFC: Use ConfigParser for High-Level Configuration

Chris Withers chris at simplistix.co.uk
Mon Mar 13 03:46:15 EST 2006


Jim Fulton wrote:
> Would it be possible to write a configuration file that loaded
> it's own schemas?  

Not sure what you mean...

> For example, suppose I wanted to configure
> zope and twisted, could I do something like:
> 
>   import zope.app.appsetup
>   import zope.app.twisted
>   import zope.testrunner

I think it's %import you're looking for.

>   site-definition site.zcml

%import site.conf? ;-)

>   interrupt-check-interval 200
> 
>   <server>
>     type HTTP
>     address 8080
>   </server>
> 
>   <zodb>
>     <filestorage>
>       path Data.fs
>     </filestorage>
>   </zodb>
> 
>   <accesslog>
> 
>     <logfile>
>       path access.log
>     </logfile>
>   </accesslog>
> 
>   <eventlog>
> 
>     <logfile>
>       path z3.log
>     </logfile>
> 
>     <logfile>
>       path STDOUT
>     </logfile>
>   </eventlog>
> 
>   tests-pattern f?tests$
>   tests-path src
>   module-pattern 
> !^(ZConfig|BTrees|persistent|ThreadedAsync|transaction|ZEO|ZODB|twisted|zdaemon|zope[.]testing|)[.] 

Okay, not sure what the troublesome bit of the above is...

> Then free the main program from having
> to specify a schema?

Again, not sure what you mean...

cheers,

Chris

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



More information about the Zope3-dev mailing list