Marc-Andre Lemburg <m...@egenix.com> added the comment:
On 27.03.2022 09:56, Hubert Tournier wrote: > > The storage format used under Windows is completely different from the one > used under Unix (or *BSD). The shelve module uses the dbm module underneath and this will pick its storage mechanism based on what's available on the platform: https://docs.python.org/3/library/dbm.html https://github.com/python/cpython/blob/3.10/Lib/dbm/__init__.py It's likely that you'll get the dbm.dumb interface on Windows. On Linux, you typically have one of gdbm or the Berkley DB installed. dbm.whichdb() will tell you which type of dbm implementation your files are likely using. More on the differences of DBM style libs: http://www.ccl.net/cca/software/UNIX/apache/apacheRH7.0/local-copies/dbm.html Aside: You are probably better off using SQLite with a pickle layer to store arbitrary objects. This is much more mature than the dbm modules. ---------- nosy: +lemburg _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue47072> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com