[Tutor] howto mysqldb dictionary cursor

Kent Johnson kent37 at tds.net
Fri Apr 25 14:43:56 CEST 2008

Vaibhav.bhawsar wrote:
> I have been trying to get the DictCursor working with mysqldb module but 
> can't seem to. I have pasted the basic connection code and the traceback 
> from pydev. The connection does open with the default cursor class. 
> can't figure out how to use the dict cursor class instead of the default 
> one. many thanks.
> <code>
> import MySQLdb

Try adding
import MySQLdb.cursors


More information about the Tutor mailing list