Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. def query_each(cursor, sql, param=()):
  2. cursor.execute(sql, param)
  3. while True:
  4. fetch = cursor.fetchone()
  5. if fetch is None:
  6. break
  7. yield fetch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement