13 Oct
1999
13 Oct
'99
8:57 p.m.
Welcome - On Wed, 13 Oct 1999, Hung Jung Lu wrote:
myprogram.py:
def myfunc(x): return 2*x;
How do I proceed to use it in DTML, and how do I place it in the external methods folder?
First go in your Zope management screen and select external method from the available object list. Add an id (lets say testit) add the function name (in your case myfunc) and then the python module file (which should exist in the Extensions directory in the main python distribution. In your case myprogram.py) click add and that's about it. In a DTML method you can call your function by simply calling: <dtml-var "testit(3)"> should print out 6 Pavlos