[ZPT] Parameter to a python script?

Evan Simpson evan@zope.com
Fri, 25 Jan 2002 10:58:39 -0500


Damir Bartakovic wrote:
 > Therefore I am calling
 > <span tal:replace="python: here.display_sex(result.pers_sex)"></span>
 >
 > Since I am not very common with python and scripts. In which way I can
 > access the variable within the script?

You need to declare the parameter by placing it in the "Parameters"
field of the Script.  In this case, you could set the parameters of your 
"display_sex" Script to "sex", and use that name to refer to it in the 
body of the Script.  Your call above should work fine once you have done 
this.

Cheers,

Evan @ Zope