shuffle the lines of a large file

Heiko Wundram modelnine at ceosg.de
Mon Mar 7 09:27:11 EST 2005


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050307/24420004/attachment.sig>


More information about the Python-list mailing list