[Zope] Creating a variable in a DTML method that may be
modified
Dylan Reinhardt
zope@dylanreinhardt.com
Tue, 04 Feb 2003 13:18:45 -0800
At 11:34 AM 2/4/2003, Asad Habib wrote:
>Hello. Does anyone know how to create a variable in a
>DTML method which may be updated by a Python script? I
>am currently using the set method of the REQUEST
>object to create a variable. However, creating a
>variable in this fashion renders it permanent.
I'm not aware of any degree of "permanence" in REQUEST variables, so I
doubt that's your problem.
Use REQUEST.set() to _create_ a variable and assign its initial value.
After that point, just use plain old dtml-call and ordinary Python
expressions to manipulate the value of the variable.
Not all built-in methods of Python types are supported, but there's enough
available to do pretty much anything you need to do. If you're having
difficult making a particular assignment, it would be helpful if you
provide more detail.
And stop cross-posting these questions to Zope-dev... that is *not* the
appropriate forum for usage-related questions.
HTH,
Dylan