shelve and ".bak .dat .dir" files

Michele Petrazzo michele.petrazzo at TOGLIunipex.it
Thu Apr 6 08:00:01 EDT 2006


Hi,
I'm trying a script on a debian 3.1 that has problems on shelve library.
The same script work well on a fedora 2 and I don't know why it create 
this problem on debian:

#extract from my code
import shelve
class XX:
   def __init__(self):
     self._data = shelve.open("/tmp/myfile")

   # do the work

   def onClose(self):
     self._data.close()


Now I see that shelve create not my file, but three files that has the 
name that I want (/tmp/myfile) and also the extensions: .bak .dat .dir

Of course, before say to shelve to open, I delete the previous file, and 
I have all the rights to do what I want into the directory.

How solve it?

Thanks,
Michele



More information about the Python-list mailing list