[pysqlite] Escaping strings with pysqlite

Christoph Burgmer <christoph.burgmer-b+b15Z6w9cpy80wz8M7KhqmYAUrVh0xC@public.gmane.org> Sat, 21 Jun 2008 01:44:30 +0200
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
Hi list,

I am looking for an equivalent to conn.escape_string() from mysql-python 
(which appears to be mysql_real_escape_string() from the mysql lib).

I'd like to be able to put the code together in a flexible way instead of 
using the following proposition:

cur.execute("insert into mytable(mycol) values (?)", (my_string,))

Google wouldn't come up with anything helpful except with the hint above, and 
I don't know where I should look for an API. Is it exotic to ask for a 
function like this?

Chris