#!/bin/env python import bsddb import time import sys # This is where the 'words' is. WD = bsddb.btopen('words.db', 'r') # text for the spell check text = file(sys.argv[1]).read() twords = text.split() nowords = [] start = time.time() print 'start %f' % start for w in twords: w = w.strip('.,;').lower() if not WD.has_key(w) and w not in nowords: nowords.append(w) stop = time.time() print 'stop %f' % stop print 'time %f' % (stop - start) print 'not in words %d' % len(nowords)