[Zope-dev] printing characters

Carlos Neves neli@deus.ruido-visual.pt
Wed, 10 May 2000 17:51:32 +0100


On Wed, 10 May 2000, josh on wrote:
> Hi,
> 
>  can someone tell me how I could change this so that it prints out 27
> characters?
> 
> <dtml-in "_.range(28)">
> <dtml-var "_.chr(sequence-index)">
> </dtml-in>
> 


<dtml-in "_.range(28)">
<dtml-var "_.chr(_['sequence-index']+32)">
</dtml-in>

The thing is if you embrace sequence-index in "" zope'll try to calc sequence
minus index... and so you need to enclose the var name in _['varname']. Plus
32? coz this way they are ascii printable chars ;)

----
Carlos Neves
cneves@ruido-visual.pt