[z3-five] Using ztapi in FIve

Andreas Jung lists at andreas-jung.com
Tue Apr 19 19:26:49 CEST 2005


I have tried the following from the command line:

from interfaces.stopwords import IStopwords
from stopwords import StopwordUtility

ztapi.provideUtility(IStopwords, StopwordUtility)

ajung at localhost:~/sandboxes/Zope/Zope/lib/python/Products/TextIndexNG3: !py
python2.3 shell.py
Traceback (most recent call last):
  File "shell.py", line 23, in ?
    ztapi.provideUtility(IStopwords, StopwordUtility)
  File "/develop/sandboxes/Zope/Zope/lib/python/zope/app/tests/ztapi.py", 
line 81, in provideUtility
    s = zapi.getGlobalServices().getService(Utilities)
  File "/develop/sandboxes/Zope/Zope/lib/python/zope/component/service.py", 
line 109, in getService
    raise ComponentLookupError(name)
zope.component.exceptions.ComponentLookupError: 'Utilities'

Bug or feature?

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://codespeak.net/pipermail/z3-five/attachments/20050419/48ef8d99/attachment.bin


More information about the z3-five mailing list