how to get full-text search of pysqlite3 work in python2.5.2
Hi, my environment is debian, python 2.5.2. when i call con.enable_load_extension(True), the following message prompt out. debian:~# python2.5 Python 2.5 (release25-maint, Jul 20 2008, 20:47:25) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> con = sqlite3.connect(":memory:") >>> con.enable_load_extension(True) Traceback (most recent call last): File "", line 1, in AttributeError: 'sqlite3.Connection' object has no attribute 'enable_load_extension' Thanks Hawk -- http://mail.python.org/mailman/listinfo/python-list
Re: how to get full-text search of pysqlite3 work in python2.5.2
On Oct 30, 8:21 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > On 10/30/08, hawk <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > my environment is debian, python 2.5.2. > > when i call con.enable_load_extension(True), the following message > > prompt out. > > debian:~# python2.5 > > Python 2.5 (release25-maint, Jul 20 2008, 20:47:25) > > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import sqlite3 > > >>> con = sqlite3.connect(":memory:") > > >>> con.enable_load_extension(True) > > Traceback (most recent call last): > > File "", line 1, in > > AttributeError: 'sqlite3.Connection' object has no attribute > > 'enable_load_extension' > > enable_load_extension was added in pysqlite 2.5, but python 2.5.2 > includes an older version of pysqlite. > > > Thanks > > Hawk > > > -- > > http://mail.python.org/mailman/listinfo/python-list > > -- > -- Guilherme H. Polo Goncalves i have solved this problem by install from latest source package. but, another issue raised, when i called con.execute("select load_extension('./fts3.so')") and con.execute("CREATE VIRTUAL TABLE posts using FTS3(title, body);"). the error message is, >>> from pysqlite2 import dbapi2 as sqlite3 >>> con = sqlite3.connect(":memory:") >>> con.enable_load_extension(True) >>> con.execute("select load_extension('./fts3.so')") Traceback (most recent call last): File "", line 1, in pysqlite2.dbapi2.OperationalError: extension loading is disabled i checked whole file system for fts.so. but there is no fts3.so anymore. then i downloaded the full source code of latest sqlite, and compiled it. but also, no fts2.so exists under build folder. finally, i downloaded sqlite-amalgamation-3_6_4.zip and compiled it with CFLAGS="-DSQLITE_ENABLE_FTS3=1" option. the whole command line is "CFLAGS="-DSQLITE_ENABLE_FTS3=1" ./configure". unfortunately, the fts3.so cannot be found too. how can i get the fts2.so!!! -- http://mail.python.org/mailman/listinfo/python-list
how can i get the fts2.so?
Hello, everybody, i already have python2.5.2 on my debian box. i checked whole file system for fts.so. but there is no fts3.so anymore. then i downloaded the full source code of latest sqlite, and compiled it. but also, no fts2.so exists under build folder. finally, i downloaded sqlite- amalgamation-3_6_4.zip and compiled it with CFLAGS="- DSQLITE_ENABLE_FTS3=1" option. the whole command line is "CFLAGS="- DSQLITE_ENABLE_FTS3=1" ./configure". unfortunately, the fts3.so cannot be found too. how can i get the fts2.so!!! Thanks in advance Xiang -- http://mail.python.org/mailman/listinfo/python-list
Re: how can i get the fts2.so?
sorry, all fts2 is fts3. On Oct 30, 10:06 pm, hawk <[EMAIL PROTECTED]> wrote: > Hello, everybody, > i already have python2.5.2 on my debian box. i checked whole file > system for fts.so. but there is no fts3.so anymore. then i downloaded > the full source code of latest sqlite, and compiled it. but also, no > fts2.so exists under build folder. finally, i downloaded sqlite- > amalgamation-3_6_4.zip and compiled it with CFLAGS="- > DSQLITE_ENABLE_FTS3=1" option. the whole command line is "CFLAGS="- > DSQLITE_ENABLE_FTS3=1" ./configure". unfortunately, the fts3.so cannot > be found too. > how can i get the fts2.so!!! > Thanks in advance > Xiang -- http://mail.python.org/mailman/listinfo/python-list
Re: how to get full-text search of pysqlite3 work in python2.5.2
sorry, all fts2 is fts3. On Oct 30, 10:04 pm, hawk <[EMAIL PROTECTED]> wrote: > On Oct 30, 8:21 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > > > > On 10/30/08, hawk <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > my environment is debian, python 2.5.2. > > > when i call con.enable_load_extension(True), the following message > > > prompt out. > > > debian:~# python2.5 > > > Python 2.5 (release25-maint, Jul 20 2008, 20:47:25) > > > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> import sqlite3 > > > >>> con = sqlite3.connect(":memory:") > > > >>> con.enable_load_extension(True) > > > Traceback (most recent call last): > > > File "", line 1, in > > > AttributeError: 'sqlite3.Connection' object has no attribute > > > 'enable_load_extension' > > > enable_load_extension was added in pysqlite 2.5, but python 2.5.2 > > includes an older version of pysqlite. > > > > Thanks > > > Hawk > > > > -- > > > http://mail.python.org/mailman/listinfo/python-list > > > -- > > -- Guilherme H. Polo Goncalves > > i have solved this problem by install from latest source package. but, > another issue raised, when i called con.execute("select > load_extension('./fts3.so')") and con.execute("CREATE VIRTUAL TABLE > posts using FTS3(title, body);"). the error message is, > > >>> from pysqlite2 import dbapi2 as sqlite3 > >>> con = sqlite3.connect(":memory:") > >>> con.enable_load_extension(True) > >>> con.execute("select load_extension('./fts3.so')") > > Traceback (most recent call last): > File "", line 1, in > pysqlite2.dbapi2.OperationalError: extension loading is disabled > > i checked whole file system for fts.so. but there is no fts3.so > anymore. then i downloaded the full source code of latest sqlite, and > compiled it. but also, no fts2.so exists under build folder. finally, > i downloaded sqlite-amalgamation-3_6_4.zip and compiled it with > CFLAGS="-DSQLITE_ENABLE_FTS3=1" option. the whole command line is > "CFLAGS="-DSQLITE_ENABLE_FTS3=1" ./configure". unfortunately, the > fts3.so cannot be found too. > how can i get the fts2.so!!! -- http://mail.python.org/mailman/listinfo/python-list
Is there any python lib for NAT transversal?
Is there any python lib for NAT transversal? -- http://mail.python.org/mailman/listinfo/python-list
A python STUN client is ready on Google Code.
http://code.google.com/p/boogu/ Enjoy it! Hawk -- http://mail.python.org/mailman/listinfo/python-list
Re: A python STUN client is ready on Google Code.
I upload a new version. Add more print log into my code to help people understand my program 2008/2/29, hawk gao <[EMAIL PROTECTED]>: > http://code.google.com/p/boogu/ > Enjoy it! > > > Hawk > -- http://mail.python.org/mailman/listinfo/python-list
Fwd: how to get full-text search of pysqlite3 work in python2.5.2
actually, the latest situation is debian:~/pysqlite-2.5.0/doc# python >>> from pysqlite2 import dbapi2 as sqlite3 >>> con = sqlite3.connect(":memory:") >>> con.execute("CREATE VIRTUAL TABLE posts using FTS3(title, body);") Traceback (most recent call last): File "", line 1, in pysqlite2.dbapi2.OperationalError: no such module: FTS3 -- Forwarded message -- From: hawk gao <[EMAIL PROTECTED]> Date: 2008/10/30 Subject: Re: how to get full-text search of pysqlite3 work in python2.5.2 To: Guilherme Polo <[EMAIL PROTECTED]> I build and install a 3.6.4 by following this guide http://www.sqlite.org/cvstrac/wiki?p=CompilingFts eventually, i can run "CREATE VIRTUAL TABLE posts using FTS3(title, body);" under sqlite3 command line. debian:~/pysqlite-2.5.0# sqlite3 SQLite version 3.6.4 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> CREATE VIRTUAL TABLE posts using FTS3(title, body); sqlite> then i rebuild and reinstall pysqlite2.5.0. but, even "from pysqlite2 import dbapi2 as sqlite3" cannot be accepted. debian:~/pysqlite-2.5.0# python Python 2.5 (release25-maint, Jul 20 2008, 20:47:25) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pysqlite2 import dbapi2 as sqlite3 Traceback (most recent call last): File "", line 1, in File "pysqlite2/dbapi2.py", line 27, in from pysqlite2._sqlite import * ImportError: No module named _sqlite 2008/10/30 Guilherme Polo <[EMAIL PROTECTED]> > On 10/30/08, hawk gao <[EMAIL PROTECTED]> wrote: > > > Thanks for your advice. but the problem still here. > > > > debian:~/sqlite-3.6.4-build# python > > Python 2.5 (release25-maint, Jul 20 2008, 20:47:25) > > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from pysqlite2 import dbapi2 as sqlite3 > > >>> con = sqlite3.connect(":memory:") > > >>> con.execute("CREATE VIRTUAL TABLE posts using FTS3(title, body);") > > Traceback (most recent call last): > >File "", line 1, in > > pysqlite2.dbapi2.OperationalError: no such module: FTS3 > > > > Yes... you have to compile pysqlite against the sqlite library that > has the builtin support fot fts3. pysqlite is probably being compiled > against the sqlite found in /usr/lib, while the sqlite with fts3 > support is at /usr/local/lib. > > -- > -- Guilherme H. Polo Goncalves > -- http://mail.python.org/mailman/listinfo/python-list