shelve and ".bak .dat .dir" files

Sion Arrowsmith siona at chiark.greenend.org.uk
Thu Apr 6 09:27:12 EDT 2006


Michele Petrazzo  <michele.petrazzo at TOGLIunipex.it> wrote:
>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:
> [ ... ]
>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

This is a documented behaviour of shelve:

http://docs.python.org/lib/module-shelve.html

and note "an extension may be added to the filename and more than one
file may be created". I guess this depends on what dbm shelve is
built on the documentation implies it goes through anydbm. I'm not
seeing this behaviour on my Debian 3.1 (and I fail to understand why
it is a problem).

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list