old python needs __main__ to call a module
[pylucene.git] / samples / LuceneInAction / BooksLikeThis.py
1
2 import os, sys, lucene
3 lucene.initVM()
4
5 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
6 sys.path.append(baseDir)
7
8 from lia.advsearching.BooksLikeThis import BooksLikeThis
9 from lucene import System
10
11 System.setProperty("index.dir", os.path.join(baseDir, 'index'))
12 BooksLikeThis.main(sys.argv)