Tal vez, un generador:
Código Python:
Ver originalrow = cursor.fetchone()
yield row
while row is not None:
row = cursor.fetchone()
yield row
O tal vez
Código Python:
Ver originalrow = cursor.fetchone()
while row is not None:
# process
row = cursor.fetchone()