def getSchema(): startup = os.path.dirname(os.path.realpath(ZServer.Zope2.Startup.__file__)) schemafile = os.path.join(startup, 'zopeschema.xml') opts = ZopeOptions() opts.schemafile = schemafile opts.load_schema() return opts.schema
def getSchema(schemafile): global _SCHEMA if schemafile not in _SCHEMA: opts = ZopeOptions() opts.schemafile = schemafile opts.load_schema() _SCHEMA[schemafile] = opts.schema return _SCHEMA[schemafile]
def getSchema(): startup = os.path.dirname( os.path.realpath(ZServer.Zope2.Startup.__file__)) schemafile = os.path.join(startup, 'zopeschema.xml') opts = ZopeOptions() opts.schemafile = schemafile opts.load_schema() return opts.schema