Keys from dictionaries
Hi people, please tell me a way to get the keys and/or values form an dictonary in an DTML-Document I want to get the keys from the SQL-Method. I thought it has to look like this: <dtml-in Query> <dtml-var sequence-key> <dtml-var sequence-item> </dtml-in> The result ist only the first key and some curious value (perhaps the rest of the address string). Trying the equivalent in python-script, like for x in Query: print x.keys() return printed is rejected by the parser with regards Axel
On Sunday 11 March 2001 09:34, Axel Missbach wrote:
I want to get the keys from the SQL-Method. I thought it has to look like this:
<dtml-in Query> <dtml-var sequence-key> <dtml-var sequence-item> </dtml-in>
zsql don't return dictionaries they return Result objects. defined in lib/python/Shared/DC/ZRDB/Result.py some methods that might help you out data_dictionaries names dictionaries usage <dtml-let r=Query> <dtml-in "r.dictionaries()"> <dtml-var sequence-key> <dtml-var sequence-item> </dtml-in> </dtml-let> cheers kapil
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Axel Missbach
please tell me a way to get the keys and/or values form an dictonary in an DTML-Document
<dtml-in "theDict.items()"> <sequence-key>: <sequence-item><br> </dtml-in> regards Max M Max M. W. Rasmussen, Denmark. New Media Director private: maxmcorp@worldonline.dk work: maxm@normik.dk ----------------------------------------------------- Shipping software is an unnatural act
participants (3)
-
Axel.Missbach@t-online.de -
ender -
Max M