[Zope] how to [Q]

Teodor Cimpoesu teo@digiro.net
Fri, 03 Dec 1999 15:55:39 +0200


Shalabh Chaturvedi wrote:
> 
> Try this (untested):
> <dtml-in "_">
>   <dtml-var sequence-key> = <dtml-var sequence-item> <br>
> </dtml-in>

This doesn't work :( 
I get 
 Error Type: TypeError
 Error Value: argument 1: expected read-only character buffer, int found 

> | o In general, if I have an object  can I loop though it's elements
> | like `for i in obj: print i' or someting?

> <dtml-in obj>
>  <dtml-var sequence-item> <br>
> </dtml-in>

This won't work either (I tried w/ REQUEST and got `unsliceable object')
 
> | o Is there a `dump()' function to display an object as-is?
> In Python you can uses backquotes (`) around the object. In DTML:-
> 
> <dtml-var expr="`obj`">
> The object may be printed inside <...>  so you may not see it on the
> html page. Look at the source.

Now this is the cool one :-) it works, and , to my surprise, 
<dtml-var expr="`REQUEST`"> generates a nice table not a hidden thingie.

Thank you for taking your time,

-- 
CIMPOESU Teodor, Web Programmer

@ DIGICOM S.A. Bucharest, Romania
@ Internet, site development
@ teo@digiro.net , +(401)-330.47.28

official home page ~ http://www.digiro.net/
Internet  web page ~ http://internet.digiro.net/