[Zope] how to create a new HTTPRequest record

Dieter Maurer dieter@handshake.de
Mon, 10 Mar 2003 00:31:36 +0100

Rocky Burt wrote at 2003-3-8 16:07 -0500:
 > I have a form that has var names something like this...
 >   properties.a:record
 >   properties.b:record
 > and submit's to a python script named 'myaction'.
 > Course this creates a record object for me in the python script that my form submits against.
 > But, is there anyway for one python script to programatically create a record with the same attributes and invoke myaction with that record object?
 > (this is all TTW of course)

from Products.PythonScripts.standard import Object

newObj= Object()
for k,v in oldObj.items(): setattr(newObj,k,v)