| 1 | from mod_python import apache
|
|---|
| 2 | import sys
|
|---|
| 3 | import os
|
|---|
| 4 |
|
|---|
| 5 | # Change these to point to your xapian installation:
|
|---|
| 6 | sys.path.insert(0, '/home/richard/private/Working/xapian/build/xapian-bindings/python/.libs')
|
|---|
| 7 | sys.path.insert(0, '/home/richard/private/Working/xapian/build/xapian-bindings/python')
|
|---|
| 8 | import xapian
|
|---|
| 9 |
|
|---|
| 10 | import threading
|
|---|
| 11 |
|
|---|
| 12 | def handler(req):
|
|---|
| 13 | req.content_type = "text/html"
|
|---|
| 14 | req.write('Begin')
|
|---|
| 15 | req.write(repr(req.interpreter))
|
|---|
| 16 | req.write(str(os.getpid()))
|
|---|
| 17 | req.write('...')
|
|---|
| 18 |
|
|---|
| 19 | d = xapian.Database('my/index/path')
|
|---|
| 20 |
|
|---|
| 21 | req.write(' OK')
|
|---|
| 22 | return apache.OK
|
|---|