Re: [Zope] First External Method
At 05:21 PM 10/23/01 +0400, you wrote:
On Tue, Oct 23, 2001 at 05:59:22AM -0700, Ben Ocean wrote:
Hi; Here is my very_simple external method. It is called sizeCalc
Some number of errors.
def sizeCalc(x,y): print x*y
return printed
Well, that didn't work either, but this did:
def sizeCalc(x,y): return x*y <<<
I have imported the external python method. I call it in a script with this line: <img src="images/top" width=<dtml-var sizeCalc(1008,<dtml-var size>)>
Do not use DTML inside DTML. <img src="images/top" width=<dtml-var sizeCalc(1008,size)>...
It chokes on the *size* part of the above line of code. Is it possible to call <dtml-var size> from within the External Script? Or, how else should I call it? TIA, BenO
On Tue, Oct 23, 2001 at 07:31:21AM -0700, Ben Ocean wrote:
Do not use DTML inside DTML. <img src="images/top" width=<dtml-var sizeCalc(1008,size)>...
It chokes on the *size* part of the above line of code. Is it possible to call <dtml-var size> from within the External Script? Or, how else should I call it?
You should call it like this: <dtml-var "sizeCalc(1008, size)">. And if you receive an error about "size" - there is a problem with that size, and you should fix the problem with the size, not with the External Method. Oleg. -- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (2)
-
Ben Ocean -
Oleg Broytmann