[Tutor] please help with sqlite replace function

aivars aivars868 at gmail.com
Fri Nov 7 05:03:47 CET 2008

Thanks, John,
Yes it seems you are right. The ActiveState python version I have
installed have sqlite 2.3.2 only. I find it strange.
I see that on a python website there is is a new version Python26
relesed. Should i go on and install Python26? I understand that I can
install pure Python from python website and after that I can install
Mark Hammonds PythonWin to get other things for windows? Or maybe I
will reinstall ActiveState Python25 and install Python25 from the
official website

Copying dll to c:\python25\DLLs directory did not help - it still
shows version sqlite version 2.3.2. which I also do not understand why

Re user defined function - it is one of the ways to go probably
quickest but I would like to have newer version of sqlite being
already with python

I am noob in Python still

Thanks for your input


2008/11/6 John Fouhy <john at fouhy.net>:
> 2008/11/7 aivars <aivars868 at gmail.com>:
>> I use python (activestate), WinXP, sqlite version 3.6.2
> Hi Aivars,
> I believe python has its own built-in sqlite, rather than using the
> version you installed independently.  So it is possible that the
> python version of sqlite is older than 3.6.2 and does not yet have the
> replace() function.
> (run 'import sqlite3' and then examine 'sqlite3.sqlite_version' to see
> what version you are using)
> You could try replacing sqlite3.dll in your python25\dlls directory
> with the DLL from your sqlite installation (make a backup first :-) ).
>  Alternatively, you could define the replace() function in python and
> then add it to your database: see
> http://www.initd.org/pub/software/pysqlite/doc/usage-guide.html#creating-user-defined-functions
> .
> HTH.
> --
> John.

More information about the Tutor mailing list