1.1 --- a/test_indexed.py Sat Oct 29 00:30:20 2011 +0200
1.2 +++ b/test_indexed.py Sun Apr 21 22:04:07 2013 +0200
1.3 @@ -18,7 +18,7 @@
1.4 try:
1.5 t = time.time()
1.6 l = make_index(f, accessor.get_key, int(interval))
1.7 - print "Indexed in %s seconds." % (time.time() - t)
1.8 + print >>sys.stderr, "Indexed in %s seconds." % (time.time() - t)
1.9
1.10 # Now use the index.
1.11
1.12 @@ -32,9 +32,11 @@
1.13 # Perform the search.
1.14
1.15 t = time.time()
1.16 - line = index.find(term)
1.17 - if line:
1.18 - print "Found (at %s seconds)...\n%s" % (time.time() - t, line)
1.19 + lines = index.find(term)
1.20 + if lines:
1.21 + print >>sys.stderr, "Found (at %s seconds)..." % (time.time() - t)
1.22 + for line in lines:
1.23 + sys.stdout.write(line)
1.24
1.25 finally:
1.26 f.close()