This is because the object returned by new() is unprotected (you can't make any security assertions on things of its type because it is returned only by a factory method) and unprotectable (it is a C-defined Python object rather than a Python-defined Python object). This is Zope protecting you from yourself in a cheerfully annoying way. ;-) Workaround: use an external method instead. HTH, - C On Mon, 2002-10-21 at 00:35, keo wrote:
hi!
i want to use the md5 module,
i made a folder Imports, and a file __init__.py in it, containing:
from Products.PythonScripts.Utility import allow_module, allow_class from AccessControl import ModuleSecurityInfo, ClassSecurityInfo from Globals import InitializeClass
allow_module("md5")
now i can import md5, and use m=md5.new(), but still cant use m.hexdigest(), it keeps on giving 401 unauthorized replies ...
i tried to add ModuleSecurityInfo('md5').declarePublic('hexdigest') to __init__.py but didnt help.
what am i doing wrong?
thanks,
k
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )