Without spending much time looking at your script (to say the least), I suspect it would be easier and more robust to use pickle to store and retrieve the data, instead of trying to do it yourself through struct packing, shelving and the like. Joshua