Pete Kazmier writes:
 > I'm trying to keep a cumulative count while sequencing over a list via
 > the dmtl-in tag.  I tried this but it didn't work, Zope complained
 > about the syntax....
 > <dtml-let totalActive="0">
 > <dtml-in "objectValues(['Gateway'])">
 >   <dtml-with sequence-item>
 >     <dtml-var "totalActive=totalActive+active">
 >   </dtml-with>
 > </dtml-in>
I can tell you, why you get the syntax error.
Luis Cortes has told you, how you could do your job.

  Python distinguishes between expressions which can be "eval"ed
  and commands which can be "exec"ed.
  Assignments are commands, as are definitions, if, for, while constructs.

  Zope uses "eval" to evaluate expressions in DTML-tags.
  "eval" raises a SyntaxError when confronted with a command.


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to