[2.5.1] Converting string to int?

Gilles Ganault nospam at nospam.com
Thu Oct 23 03:38:11 EDT 2008


On Thu, 23 Oct 2008 09:19:07 +0200, Gilles Ganault <nospam at nospam.com>
wrote:
>I'm using the APSW wrapper to SQLite, and I'm stuck at how to pass
>data from a dictionary to the database which expects an integer:

Found it: Apparently, this wrapper uses a different placeholder and
takes care of conversion if needed:

cursor.execute("INSERT INTO books (isbn,carton) VALUES (?,?)",
(isbn,carton))

HTH,



More information about the Python-list mailing list