[Zope] creating a python function callable within zope

Steve Nicholson yahoogroups@yoursolutions.com
Fri, 2 Aug 2002 21:41:43 +0100


I have created a python based zope product for the cmf which is working
ok. I would like to create a function that belongs in the same .py file
as the product class but the function will not be a method of a class
instance. I want to be able to call this function from anywher within
zope to do something related to the product class but not an instance of
that class. I assume the function "def function( self ): etc..." is
placed outside of the class statement in the .py file but I cannot work
out what I need to do to be able to call it in zope, or if it's possible
or wise to do. At the moment I have this function written in a zope
"python script". Or am I supposed to make it an external method?

Hope that makes sense as I'm still trying to get my head around this
class,instance,method,function thing!
Any ideas or help on where I am going wrong would be much appreciated.

(Running zope 2.5.1 / python 2.1.3 / win2000)
Thanks
Steve.