pysqlite2 fetching from select different than pysqlite?

schwehr at gmail.com schwehr at gmail.com
Thu Jul 27 10:44:41 EDT 2006


Perfect.  Thanks much!

-kurt

> <python>
> from pysqlite2 import dbapi2 as sqlite
>
> db = sqlite.connect (":memory:")
> db.row_factory = sqlite.Row
>
> db.execute ("CREATE TABLE x (i INTEGER, code VARCHAR (10), name VARCHAR
> (60))")
>
> for row in db.execute ("PRAGMA TABLE_INFO ('x')"):
>   print row['name'], row['type']
> 
> </python>




More information about the Python-list mailing list