First page Back Continue Last page Overview Graphics
Basic Integration
The simplest use of ZConfig is to load a configuration based on a schema stored in a file. This example (a script) loads a configuration file specified on the command line using a schema in the same directory as the script:
import os
import sys
import ZConfig
mydir = os.path.dirname(os.path.abspath(sys.argv[0]))
schema = ZConfig.loadSchema(os.path.join(mydir, 'schema.xml'))
conf = ZConfig.loadConfig(schema, sys.argv[1])
Notes: