[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - interactiveDemo.py:1.1.2.8

Andreas Jung andreas@digicool.com
Tue, 12 Mar 2002 20:00:30 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv8925

Modified Files:
      Tag: ajung-textindexng-branch
	interactiveDemo.py 
Log Message:
added some new options


=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/interactiveDemo.py 1.1.2.7 => 1.1.2.8 ===
 import Zope
 import ExtensionClass
+from Products.ZCatalog.Catalog import Catalog
 from Products.PluginIndexes.TextIndexNG import TextIndexNG
 from Products.PluginIndexes.TextIndex import TextIndex
-from Products.ZCatalog.Catalog import Catalog
 import os, sys, re,traceback, atexit, getopt
 import time
 from optik import OptionParser
@@ -87,6 +87,7 @@
     for x in dir(extra):
         print "%25s = %s" % (x,getattr(extra,x))
 
+
     return CAT
 
 def interactive_mode(CAT):
@@ -130,9 +131,15 @@
     parser.add_option('-g','--globbing', action='store_true',
             dest='extra_useGlobbing', help='enable globbing',default=0)
 
+    parser.add_option('-D','--debug', action='store_true',
+            dest='debug', help='start Python debugger',default=0)
+
     parser.add_option('-s','--stemmer', action='store',type='string',
             dest='extra_useStemmer', help='use stemmer',default=None)
 
+    parser.add_option('-S','--similarity', action='store',type='string',
+            dest='extra_useSimilarity', help='Similarity algorithm',default=None)
+
     parser.add_option('-n','--neardistance', action='store',type='int',
             dest='extra_nearDistance',
             help='max. distance between words for near search',default=5)
@@ -171,6 +178,12 @@
                             options.timed, 
                             options.old
                         )
+
+
+    if getattr(options,'debug',0):
+        import pdb
+        pdb.set_trace()
+        sys.exit(1)
 
     interactive_mode(cat)