Re: [Zope] dtml-let help

2000-05-26 Thread Dieter Maurer

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
 > 
 > 
 > 
 > 
 >   
 > 
 >   
 > 
I can tell you, why you get the syntax error.
Luis Cortes has told you, how you could do your job.


Explanation:
  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.

Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] dtml-let help

2000-05-26 Thread Luis Cortes


I tried the same thing, it doesn't work (or at least, I haven't found a way to
make it work).

What I do now is use REQUEST.set('totalActive',0 ) and
REQUEST.get('totalActive') when I need the value.  The other alternative is to
write it in a python method.

Regards,
Luis.


On Fri, 26 May 2000, you wrote:
>> 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.  Could someone help me or point me in the right
>> direction, I search the archives but couldn't find anything relevant?
>> Thanks!
>> 
>> >   totalUnknown="0"
>>   totalPorts="0">
>> 
>> 
>>   
>> 
>> 
>> 
>>   
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> -- 
>> Peter Kazmier http://www.kazmier.com
>> PGP Fingerprint   4FE7 8DA3 D0B5 9CAA 69DC  7243 1855 BC2E 4B43 5654
>> 
>> ___
>> Zope maillist  -  [EMAIL PROTECTED]
>> 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 )
-- 
==

Luis Cortes

Pollak EPD (915) 621-6113

==


___
Zope maillist  -  [EMAIL PROTECTED]
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 )