methodsexternalconfigurezopezcml

Zope register external methods using zcml configure


Is it possible to register external methods for Zope using a configure.zcml file or something similar? I'm trying to register external Python scripts (similar to other registry items such as "jsregistry.xml" or "cssregistry.xml" in themes)


Solution

  • No. External Methods are "old tech", pre-dating the Zope Component Architecture by several years.

    You can easily add a GenericSetup import step that creates ExternalMethod objects on demand, but since only python modules located in the Extensions directories (inside Products and the INSTANCE_HOME location, you may as well just enumerate those locations via the usual Python file-access methods, add everything you find there and not use a registry at all.

    However, are you absolutely certain you want to use an ExternalMethod? Wouldn't a simple utility or view be easier?