Alric Aneron wrote at 2006-6-19 09:35 -0700: > ... >contents of myscript(): >mydict = {'key1': 'value1', 'key2': 'value2'} >mydict2 = {'key1': 'value3', 'key2': 'value4'} >finalList = [mydict, mydict2] >return finalList > >When I do this in a dtml-method: ><dtml-in "myscript()"> > <dtml-var key1> <br/> ></dtml-in> >This will not return me this: >value1 >value2 >It gives me a key error.
You should tell the "dtml-in" that it is iterating over a sequence of "mapping" objects. You do this with its "mapping" attribute. -- Dieter _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )