[Xapian-discuss] An error while testing Python 2.5 and xapian in
Win32
Olly Betts
olly at survex.com
Wed Aug 23 13:44:26 BST 2006
On Thu, Aug 03, 2006 at 12:21:34AM -0400, Vizcayno Tamparantan wrote:
> >>>import sys
> >>>sys.path.append("C:/Python25/Lib/site-packages/Xapian")
> >>>from _xapian import *
> >>>from _xapian import new_WritableDatabase, new_Document
You shouldn't use _xapian directly. Use the xapian module instead.
> >>>w=new_WritableDatabase("db",DB_CREATE_OR_OPEN)
> >>>d=new_Document()
You shouldn't call new_WritableDatabase or new_Document directly either.
See simpleindex.py for an example of how to use the xapian python
bindings correctly. Your example should probably look something like
this:
import sys
sys.path.append("C:/Python25/Lib/site-packages/Xapian")
import xapian
w=xapian.WritableDatabase("db",xapian.DB_CREATE_OR_OPEN)
d=xapian.Document()
del d
Cheers,
Olly
More information about the Xapian-discuss
mailing list