[Zope3-checkins] CVS: Packages/ZConfig - __init__.py:1.3.10.4

Fred L. Drake, Jr. fred@zope.com
Fri, 13 Dec 2002 15:14:00 -0500


Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv24278

Modified Files:
      Tag: zconfig-schema-devel-branch
	__init__.py 
Log Message:
- Admit we need ZConfig.loader and just import it
- Add loadConfig(), loadConfigFile()


=== Packages/ZConfig/__init__.py 1.3.10.3 => 1.3.10.4 ===
--- Packages/ZConfig/__init__.py:1.3.10.3	Tue Dec 10 14:50:03 2002
+++ Packages/ZConfig/__init__.py	Fri Dec 13 15:14:00 2002
@@ -16,6 +16,8 @@
 $Id$
 """
 
+import loader as _loader
+
 def loadURL(url):
     import Context
     return Context.Context().loadURL(url)
@@ -25,12 +27,16 @@
     return Context.Context().loadFile(file, url)
 
 def loadSchema(url):
-    import loader
-    return loader.SchemaLoader().loadURL(url)
+    return _loader.SchemaLoader().loadURL(url)
 
 def loadSchemaFile(file, url=None):
-    import loader
-    return loader.SchemaLoader().loadFile(file, url)
+    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):