Allows using gdbm files created with version 1.8 or 1.10, without magic number errors.
Project description
Provides a means to open a gdbm database that otherwise gives the “Bad Magic Number” error.
This can be useful when needing to support EL6 and EL7 (or CentOS 6 and CentOS 7).
It supports opening of gdbm files created with gdbm version 1.8 or 1.10. Some functionality may not work on the database, but most will, which is better than none!
The primary method of usage is to use “gdbm_compat.open_compat” in place of “gdbm.open”.
For example:
>>> import gdbm_compat>>> ...>>> mydb = gdbm.open('mydatabase', 'r') # Database created on different system that wont openTraceback (most recent call last):
File “<stdin>”, line 1, in <module>
gdbm.error: Bad magic number
>>> mydb = gdbm_compat.open_compat('mydatabase.db', 'r') # Force it to open<gdbm.gdbm object at 0x7f7da47ee110>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file gdbm_compat-1.0.1.tar.gz
.
File metadata
- Download URL: gdbm_compat-1.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73cfdfb776a66998276af4b9dfb76155f3fb804f0e5fa7b642aeb939d7c237db |
|
MD5 | 1e34d0665e01776c293731d7f293a332 |
|
BLAKE2b-256 | e59c2faf5b6c8dbcf42b8536da6dee3d97354ee4c486ba55c6a8d923e21bfd45 |