Public feed #920807

Unnamed

public text v1 · immutable
Raw Edit
·published 2008-02-27 16:58 UTC
rendered paste body
def iterate_cursor(cursor):
    l = cursor.fetchone()
    if l:
        yield l

#elsewhere:

cursor.execute("SELECT Blah...")

for line in iterate_cursor(cursor):
    # do whatever