[Zope] Re: newbie: python scripts and records

Evan Simpson evan@4-am.com
Thu, 17 Oct 2002 09:46:22 -0500


Alexis Roda wrote:
> Is there a way to create records (the same type of record I get from
> forms with :record) from a python script?

In 2.6 and above you can do:

from Products.PythonScripts.standard import Object
bar = Object()
bar.baz = 1

These are actually a subclass of 'record' that allows item assignment as 
well.

Cheers,

Evan @ 4-am