[PEAK] loading ZConfig schema from zip file
Phillip J. Eby
pje at telecommunity.com
Wed Feb 2 13:05:58 EST 2005
At 07:20 PM 2/2/05 +0200, alexander smishlajev wrote:
>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)
>+
Very clever and an excellent fix; will add this when I fix the other .zip
loading issue.
More information about the PEAK
mailing list