Fernando Martins wrote at 2003-7-13 01:48 +0200:
I'm creating a Product with a function retrieve(self, num) which returns an email.Message object.
In a zpt of the product I've
<div tal:define="msg python:here.retrieve(request['num'])">
and I would like to manipulate msg using email.Message methods, like in
<td tal:content="python:msg.get('from')">name</td>
I've added these delarations to my __init__.py
ModuleSecurityInfo('email').declarePublic('Message') ModuleSecurityInfo('Message').declarePublic('get')
Reread the "README" for "PythonScripts" and the security section in the Zope Developer Guide. Watch out for the difference between a module and a class. The second line seems to indicate that "Message" should be a class (as 'get' is an unusual function in a module). But you are using "ModuleSecurityInfo". Also: "ModuleSecurityInfo" need a full path to the module, something like "email.Message". Dieter