Wladmir Araujo Chapetta wrote at 2005-4-6 17:58 -0300:
> ...
>line 36, in Container
>    
> searchService=ExternalMethod('searchService','searchService','search','search')
>TypeError: 'module' object is not callable

A nice and precise error message:

  "ExternalMethod" is the module and not the class (as you expect).
  And the module is not callable.

Try:

   from Products.ExternalMethod.ExternalMethod import ExternalMethod


Note that after this change, your code above will only work
when "search.py" is located in your global "Extensions" folder.

For product specific ExternalMethods, they usually are better
located in the product's "Extensions" folder.
In this case, the module spec must take the form "product.module".

-- 
Dieter
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to