On Tue, Nov 28, 2006 at 06:12:19PM +0000, Chris Withers wrote:
> Is there a python-only way to register adapters instead of in ZCML and,
> if it exists, is it safe to use in conjunction with the normal zcml dances?

There's always a way :)

You could just do what the directive does - call the adapter()
function which used to be in zope.app.component.metaconfigure but now
lives in zope.component.zcml. I haven't done it but AFAICT it should
work safely.

It's sometimes instructive to look at how directives are implemented.
Find the meta.zcml file that declares the directive, and that'll tell
you what module contains the schema and handler for that directive.
The handler does the work.


Paul Winkler
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to