SV: Function to convert fetchone() result from a list to a dictionary

Carsten Gehling carsten at
Tue Apr 29 13:43:32 CEST 2003

> Fra: python-list-admin at
> [mailto:python-list-admin at]Pa vegne af Neil Padgen
> Sendt: 29. april 2003 11:16

> Take a look at the cursorclass argument:


> >>> c = db.cursor(cursorclass=MySQLdb.cursors.DictCursor)


Hmm... Nice. However, is this MySQLdb.cursors.DictCursor available in other
DB modules - say, if I someday changed to (shudder) Postgres or Oracle?

- Carsten

More information about the Python-list mailing list