for word in sys.argv[1:]: if not shIn.has_key(word): sys.stderr.write('Word %r not found in index filen' % word) continue places = shIn[word] for fname, lineno in places: print "Word %r occurs in line %s of file %s:" % (word,lineno,fname) print linecache.getline(fname, lineno),
Related Scripts with Example Source Code in same category :