[Zope] return structured result from Python scripts for page templates

Dieter Maurer dieter@handshake.de
Fri, 26 Jul 2002 19:45:37 +0200


Hi Evan,

Evan Simpson writes:
 > As you've discovered, a dictionary will work.  It's not hard to create 
 > what you originally wanted, though.  Adding the following lines before 
 > the last line of Products/PythonScripts/standard.py will do it:
 > 
 >    from ZPublisher.HTTPRequest import record
 > 
 >    security.declarePublic('Object')
 >    class Object(record):
 >        _guarded_writes = 1
 > 
 >        def __setitem__(self, key, value):
 >            self.__dict__[str(key)] = value

Thank you for the tip.

It should go into Zope 2.6, if possible in any way.


Dieter