Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is quite some indirection here. Follow me carefully.</p> <p>The <code>shelve</code> module is implemented on top of the <a href="http://docs.python.org/2/library/anydbm.html" rel="noreferrer"><code>anydbm</code> module</a>. This module acts as a facade for 4 different specific DBM implementations, and it will pick the first module available when creating a new database, in the following order:</p> <ol> <li><a href="http://docs.python.org/2/library/dbhash.html" rel="noreferrer"><code>dbhash</code></a> (deprecated but still the first <code>anydbm</code> choice). This is a proxy for the <a href="http://docs.python.org/2/library/bsddb.html#module-bsddb" rel="noreferrer"><code>bsddb</code> module</a>, <code>.open()</code> is really <code>bsddb.hashopen()</code></li> <li><a href="http://docs.python.org/2/library/gdbm.html" rel="noreferrer"><code>gdbm</code></a>, Python module for the GNU DBM library, offering more functionality than the <code>dbm</code> module can offer when used with this same lbrary.</li> <li><a href="http://docs.python.org/2/library/dbm.html" rel="noreferrer"><code>dbm</code></a>, a proxy module using either the <code>ndbm</code>, BSD DB and GNU DBM libraries (choosen when Python is compiled).</li> <li><a href="http://docs.python.org/2/library/dumbdbm.html" rel="noreferrer"><code>dumbdbm</code></a>, a pure-python implementation.</li> </ol> <p>It is this range of choices that makes <code>shelve</code> files appear to grow extra extensions on different platforms.</p> <p>The <code>dumbdbm</code> module is the one that adds the <code>.bak</code>, <code>.dat</code> and <code>.dir</code> extensions:</p> <blockquote> <p>Open a dumbdbm database and return a dumbdbm object. The filename argument is the basename of the database file (without any specific extensions). When a dumbdbm database is created, files with <code>.dat</code> and <code>.dir</code> extensions are created.</p> </blockquote> <p>The <code>.dir</code> file is moved to <code>.bak</code> as new index dicts are committed for changes made to the data structures.</p> <p>It means that the <em>other</em> three options for <code>anydbm</code> are not available on your platform.</p> <p>The other formats may give you other extensions. The <code>dbm</code> module may use <code>.dir</code>, <code>.pag</code> or <code>.db</code>, depending on what library was used for that module.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload