dtml-let and python script
Maybe this is really easy but I can find an example anywhere. How can I access a variable set with "dtml-let" inside of a python script? For example: <dtml-let val="'a value'"> <dtml-var python_script> </dtml-let> How can I access val from inside python_script? thanks -Kevin __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
btw, I don't want to pass val as a parameter to the python script. thanks --- Kevin Lewandowski <kevinsl@yahoo.com> wrote:
Maybe this is really easy but I can find an example anywhere. How can I access a variable set with "dtml-let" inside of a python script?
For example:
<dtml-let val="'a value'"> <dtml-var python_script> </dtml-let>
How can I access val from inside python_script?
thanks
-Kevin
__________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
__________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com
You should be able to access this through the namespace binding. Check the Bindings tab of the python script in question and make sure you have bound namespace to "_" (an underscore character is the recommended value for this binding). You should be able to access this by using the following code in the python script. _.getitem('val') Hope this helps, Kevin -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Kevin Lewandowski Sent: Wednesday, May 08, 2002 4:15 PM To: zope@zope.org Subject: [Zope] dtml-let and python script Maybe this is really easy but I can find an example anywhere. How can I access a variable set with "dtml-let" inside of a python script? For example: <dtml-let val="'a value'"> <dtml-var python_script> </dtml-let> How can I access val from inside python_script? thanks -Kevin __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Kevin Carlson -
Kevin Lewandowski