On Saturday 15 September 2007 19:04, Philipp von Weitershausen wrote: > >>> from zope.component import getSiteManager > >>> reg = getSiteManager() > >>> from pprint import pprint > >>> for info in reg.registeredAdapters(): > ... pprint((info.required, info.provided, info.factory, info.name)) > ... > > This will probably drown you with information, though. One step would be > to constrain the output only to browser views, in other words, 2-way > multi-adapters whose second required interface is or extends > IBrowserRequest: > > >>> from zope.publisher.interfaces.browser import IBrowserRequest > >>> for info in reg.registeredAdapters(): > ... if (len(info.required) == 2 and > ... info.required[1].isOrExtends(IBrowserRequest)): > ... pprint((info.required, info.provided, info.factory, > ... info.name)) > ... > > For better findability, you might want to search by name now. This is > left up to the skilled reader as an exercise ;)
For more specific searches on global site managers, you can use the apidoc apis. They implement a lot of the searches that are commonly interesting: >>> from zope.app.apidoc import presentation >>> for reg in presentation.getViews(IFolder): ... print reg.required, reg.provided, reg.factory, reg.name There are a lot more helpful functions there and they are all well-documented. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users