[Zodb-checkins] CVS: Packages/ZConfig - __init__.py:1.3.10.5 loader.py:1.1.2.16
Fred L. Drake, Jr.
fred@zope.com
Mon, 16 Dec 2002 13:26:09 -0500
Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv18764
Modified Files:
Tag: zconfig-schema-devel-branch
__init__.py loader.py
Log Message:
Move the implementation of the high-level load*() functions into the loader
module since that always gets loaded by the __init__.
=== Packages/ZConfig/__init__.py 1.3.10.4 => 1.3.10.5 ===
--- Packages/ZConfig/__init__.py:1.3.10.4 Fri Dec 13 15:14:00 2002
+++ Packages/ZConfig/__init__.py Mon Dec 16 13:26:09 2002
@@ -16,7 +16,9 @@
$Id$
"""
-import loader as _loader
+from ZConfig.loader import loadConfig, loadConfigFile
+from ZConfig.loader import loadSchema, loadSchemaFile
+
def loadURL(url):
import Context
@@ -25,18 +27,6 @@
def loadFile(file, url=None):
import Context
return Context.Context().loadFile(file, url)
-
-def loadSchema(url):
- return _loader.SchemaLoader().loadURL(url)
-
-def loadSchemaFile(file, url=None):
- return _loader.SchemaLoader().loadFile(file, url)
-
-def loadConfig(schema, url):
- return _loader.ConfigLoader(schema).loadURL(url)
-
-def loadConfigFile(schema, file, url=None):
- return _loader.ConfigLoader(schema).loadFile(file, url)
class ConfigurationError(Exception):
=== Packages/ZConfig/loader.py 1.1.2.15 => 1.1.2.16 ===
--- Packages/ZConfig/loader.py:1.1.2.15 Fri Dec 13 16:55:21 2002
+++ Packages/ZConfig/loader.py Mon Dec 16 13:26:09 2002
@@ -30,6 +30,19 @@
False = 0
+def loadSchema(url):
+ return SchemaLoader().loadURL(url)
+
+def loadSchemaFile(file, url=None):
+ return SchemaLoader().loadFile(file, url)
+
+def loadConfig(schema, url):
+ return ConfigLoader(schema).loadURL(url)
+
+def loadConfigFile(schema, file, url=None):
+ return ConfigLoader(schema).loadFile(file, url)
+
+
class BaseLoader:
def __init__(self):
pass