1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test_scan.py Fri Sep 30 00:44:45 2011 +0200
1.3 @@ -0,0 +1,21 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +from simplex import *
1.7 +import sys, time
1.8 +
1.9 +filename = sys.argv[1]
1.10 +terms = sys.argv[2:]
1.11 +
1.12 +f = open(filename)
1.13 +try:
1.14 + for term in terms:
1.15 + f.seek(0)
1.16 +
1.17 + t = time.time()
1.18 + line = find_line_in_file(f, term)
1.19 + if line:
1.20 + print "Found (at %s seconds)...\n%s" % (time.time() - t, line)
1.21 +finally:
1.22 + f.close()
1.23 +
1.24 +# vim: tabstop=4 expandtab shiftwidth=4