Creating objects with python?
Hi, Is it possible to create zope objects such as folders, database connections, Z SQL Methods and documents with a script written in python? If so could someone provide a link to resources or provide some sample code. Thanks Dean
On Mon, Feb 04, 2002 at 09:29:24AM +1100, Dean Grubb wrote:
Hi,
Hi.
Is it possible to create zope objects such as folders, database connections, Z SQL Methods and documents with a script written in python? If so could someone provide a link to resources or provide some sample code. Thanks
Sure you can. Some hints are in the Zope Book, in the chapter about python products. In general you only need to find the appropriate class you want to instanciate (I don't know one on the top of my head so i will do some pseudo classes here) and handle it like every other class in python: import myFineZopeClass ... myZopeObject = myFineZopeClass.TheClass(parameters) ... and you got a ZopeObject. Look into the Zope Book how the factory methods work.
Dean
Christian -- Christian Theune - ct@gocept.com gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981 reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])
participants (2)
-
Christian Theune -
Dean Grubb