9 from optparse import OptionParser
11 logging.basicConfig(level=logging.DEBUG)
13 parser = OptionParser()
14 parser.add_option("-q", "--quiet",
15 action="store_false", dest="verbose", default=True,
16 help="don't print status messages to stdout")
18 parser.add_option("-C", "--content",
19 action="store_true", dest="docontent", default=False,
20 help="Disect content, rather than the file.")
22 parser.add_option("--delay",
23 action="store_true", dest="delay", default=False,
24 help="delay after the operation, to inspect child processes")
26 (options, args) = parser.parse_args()
28 import content_index, std_index
30 from content_index import cntIndex
38 res = cntIndex.doIndex(content, fname, None, None, True)
40 res = cntIndex.doIndex(None, fname, None, fname,True)
49 tb_s = reduce(lambda x, y: x+y, traceback.format_exception( sys.exc_type, sys.exc_value, sys.exc_traceback))
50 except KeyboardInterrupt:
51 print "Keyboard interrupt"