[PEAK] loading ZConfig schema from zip file

alexander smishlajev alex at ank-sia.com
Wed Feb 2 12:20:13 EST 2005


hello!

with py2exe-packaged application, ZConfig loader fails on declarations 
like this:

  <import package="ank.BBS.MAC.TCP" />

to make it work, we have applied the following patch:

===================================================================
RCS file: /cvsroot/PEAK/src/peak/config/load_zconfig.py,v
retrieving revision 1.17
diff -u -r1.17 load_zconfig.py
--- load_zconfig.py	12 Nov 2004 18:21:10 -0000	1.17
+++ load_zconfig.py	2 Feb 2005 17:10:48 -0000
@@ -48,6 +48,10 @@
          result = super(SchemaLoader,self).loadResource(resource)
          return ConfigLoader(self.getParentComponent(), schema=result)

+    def schemaComponentSource(self, package, file):
+        file = file or "component.xml"
+        return "pkgfile:%s/%s" % (package, file)
+

  class ConfigLoader(BaseLoader,ZConfig.loader.ConfigLoader):

best wishes,
alex.




More information about the PEAK mailing list