> Odesílatel: Exteam <exteam6(a)yahoo.co.in>
> hi all,
> i'm stuck at this point,
> can some one convert thge following python code in to
> dtml & help me.
> i'm not able to convert it in to dtml.
Why do you want to recode into DTML? I think that is piece of good code and
much faster than DTML.
You could try following replacing (original line of your code, follows with
DTML code), but not tested:
> rec = context.test_select_sql()
<dtml-call "REQUEST.set(rec , test_select_sql())">
> print "Fields definitions"
Fields definitions
> recordset = rec.dictionaries()
<dtml-let "recordset = rec.dictionaries()"
> rownum = 1
<dtml-call "REQUEST.set(rownum,1)"
> for record in recordset:
<dtml-in recordset>
> print "Row %d" % (rownum), "check", record
Row <dtml-var rownum>, check <drml-var sequence-item><br>
> rownum = rownum + 1
<dtml-call "REQUEST.set(rownum,rownum+1)"
</dtml-in>
and so on on the rest of code.
> for key in record.keys():
> print key, "=", record[key]
> print "-" * 80
> return printed