[Zope] Add python class to Zope.

Dieter Maurer dieter@handshake.de
Thu, 8 Mar 2001 21:15:36 +0100 (CET)


Pattreeya Tanisaro writes:
 > 	I found some python sources which declared "class" inside.
 > I tried to call the function inside this class with external method and 
 > python script but it didn't work out.
 > 
 > 	class Guestbook:
 > 		def __init__
 > 			....
 > 		def signGuestBook
 > 			....
 > 		def feedBack.
 > 			..
 > 	How can I call the function "feedBack" to Zope?
Read the paper on Zope Security.
Otherwise, you will not be lucky.

You would not call the function directly from Zope,
but as a method of an instance "gb" of "Guestbook".
Once you have such an instance, you would
use

	<dtml-with gb>
	  <dtml-var feedback>
	</dtml-with>

Note that function definitions in Python have parameter
declaration.

It's probably advicable to look into a Python book or its
online documentation, too.
... before you start your project.


Probably, you should also read the Zope book...


Dieter