Replying to oneself is bad, but although the program works, I never intended to use a shelve to store the data. Better to use anydbm.
So, just replace: import shelve by import anydbm and lineindex = shelve.open("test.idx") by lineindex = anydbm.open("test.idx","c") Keep the rest as is. -- --- Heiko.
pgpbEE81rHUyx.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list