[Zope] Trouble With Python Script
beno
zope@thewebsons.com
Thu, 10 Oct 2002 03:46:35 -0400
Hi;
I'm trying to add a python script and running into this error:
Error Type: TypeError
Error Value: indexCSS() takes no arguments (1 given)
I click the *Script (Python)* button from the pull-down menu and add the
script *indexCSS* thus:
## CSS for index_frame.zpt of TELEVISION.VI
##
##parameters=size
##
## I use a function I've already built--but include afresh within this
file--called sizeCalc2()
## I also utilize lamda functions inline, converting the int to a string
##
import string
def sizeCalc2(x,y):
y = string.atoi(y)
x = int(round(x*y/1280))
return x
def indexCSS(size):
css = ".headline { position: absolute; top:
"+str(sizeCalc2(100,size))+"; left: "+str(sizeCalc2(200,size))+"; }"
return css
...
and add the following as a parameter
size
Yet, still, I get the above error. What have I done wrong?
TIA,
beno