def _quote_escape(item):
 rex_sqlquote = re.compile("'", re.M)
 return rex_sqlquote.sub("''", item)

def _quote_escape ( item ) : rex_sqlquote = re . compile ( "'" , re . M ) return rex_sqlquote . sub ( "''" , item )
make sure single quotes are escaped properly in sqlite3 fashion .