[ZPT] python to zpt

Exteam exteam6 at yahoo.co.in
Mon Jul 21 10:22:08 EDT 2003


sorry small addition,i can do this in the zsql method, but i am not supposed to do this in my zsql method,thanks prasadThanks a lot Robert,my only problem is refering to a particular column name in the db table.suppose i have 2 columns (a & b )in my DB table , i want to print only records in column a.is this possible in the script we have?thanks a lot againprasad --- robert  wrote: > call your script getRecords> change it like so:> rec = context.test_select_sql()> recordset = rec.dictionaries()> return recordset> > then in a template> >   >        tal:content="python:'%s=%s' % > (key, record[key]">>   > > > This is untested but should give you the idea> Robert> > Am Montag, 21. Juli 2003 09:06 schrieb Exteam:> > hi all,> > i'm stuck at this point,> > can some one convert the following python code in> to> > zpt & help me.> > i'm not able to convert it in to zpt.> > --------------------------------> > rec = context.test_select_sql()> > print "Fields definitions"> > recordset =
 rec.dictionaries()> > rownum = 1> > for record in recordset:> >   print "Row %d" % (rownum), "check", record> >   rownum = rownum + 1> > for key in record.keys():> >        print key, "=", record[key]> >        print "-" * 80> > return printed> > ---------------------------> > plz help me> > thanks> >> >> ________________________________________________________________________> > Send free SMS using the Yahoo! Messenger. Go to> > http://in.mobile.yahoo.com/new/pc/> >> > _______________________________________________> > ZPT mailing list> > ZPT at zope.org> > http://mail.zope.org/mailman/listinfo/zpt> > -- > mit freundlichen Grüssen> > Robert Rottermann> www.redCOR.ch>  
SMS using the Yahoo! Messenger;Download latest version.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zpt/attachments/20030721/016b2a33/attachment.htm


More information about the ZPT mailing list