[Zope3-dev] Re: RFC: Zope Configuration Egg Support

Rocky Burt rocky at serverzen.com
Mon Oct 23 08:49:19 EDT 2006


On Mon, 2006-23-10 at 10:02 -0230, Rocky Burt wrote:
> Unless I'm totally off base here, my feeling is that Java has done a
> nice job of dealing with this situation a long time ago.  Of course Java
> has had jar support (and I believe ClassLoader.getResource support)
> since java 1.1 and we're only just now getting egg support.  It seems to
> me that egg support is rather useless if there isn't an abstraction API
> (perhaps pkg_resources is this) that can load a file from anywhere not
> caring if it's in an egg or not.

I guess I could have just looked at the pkg_resources documentation.
The specific functionality I'm talking about is the *ResourceManager
API* which is documented here:

http://peak.telecommunity.com/DevCenter/PkgResources#resourcemanager-api

Pass it a relative package/module string and the file (ie .zcml file)
you wanna load, and it just does it's thing.  All it cares is that the
relative package/module is importable and will take care of the rest,
whether the file you want/need is in an egg or on the filesystem.

- Rocky

-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20061023/bd62b779/attachment.bin


More information about the Zope3-dev mailing list