[mod_python] mod_python & MySQLdb question: Done

tpc at csua.berkeley.edu tpc at csua.berkeley.edu
Thu Dec 18 08:45:41 EST 2003


hi Giampiero, can I ask you, being a newbie to Python
myself, why you are switching to modpython from Zope ?
I have heard many good things about Zope but have not
had the time to download and use it, but from what I hear
if you want to serve a complex database-backed application
there is no better way.

On Thu, 18 Dec 2003, Giampiero Benvenuti wrote:

> Thanks Manfred, now I'm starting to "see".
> Great tip, it works like a "swiss" clock.
>
> > This:
> >
> >> 	rows = cursor.fetchall()
> >> 	rows = list(rows)
> >> 	for row in rows:
> >> 		results = (row['news_title']+',<br>')
> >> 		req.write(results)
> >
> > can be compressed to (and made faster):
> >
> >
> > results = []
> > for row in cursor.fetchall():
> > 	results.append(row['news_title'])
> > req.write("<br />".join(results))
> >
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>



More information about the Mod_python mailing list