Code Monkey home page Code Monkey logo

Comments (2)

pawelad avatar pawelad commented on June 23, 2024

I believe this is the reason:

There is quite some indirection here. Follow me carefully.

The shelve module is implemented on top of the anydbm module. 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:

dbhash (deprecated but still the first anydbm choice). This is a proxy for the bsddb module, .open() is really bsddb.hashopen()
gdbm, Python module for the GNU DBM library, offering more functionality than the dbm module can offer when used with this same lbrary.
dbm, a proxy module using either the ndbm, BSD DB and GNU DBM libraries (choosen when Python is compiled).
dumbdbm, a pure-python implementation.
It is this range of choices that makes shelve files appear to grow extra extensions on different platforms.

The dumbdbm module is the one that adds the .bak, .dat and .dir extensions:

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 .dat and .dir extensions are created.
The .dir file is moved to .bak as new index dicts are committed for changes made to the data structures.

It means that the other three options for anydbm are not available on your platform.

The other formats may give you other extensions. The dbm module may use .dir, .pag or .db, depending on what library was used for that module.

Source


I think I had it with shelve and will just switch to a regular JSON file.

from pymonzo.

pawelad avatar pawelad commented on June 23, 2024

This should be resolved in v0.10.0

from pymonzo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.