There are various ways you could do this: If the number of results won't be too big:
... for result in sth.fetchall(): print result If it may be very large: ... result = sth.fetchone() while result: print result result = sth.fetchone() Or perhaps nicer: ... def result_iterator(result_set): yield result_set.fetchone() for result in result_iterator(sth): print result HTH. -- http://mail.python.org/mailman/listinfo/python-list