_dbm
| Use Case | Command | Description |
|---|---|---|
| Open database for reading | _dbm.open('file', 'r') | Open an existing DBM database in read-only mode |
| Open database for writing | _dbm.open('file', 'w') | Open an existing DBM database for reading and writing |
| Create new database | _dbm.open('file', 'c') | Create a new DBM database (or open existing) with read/write access |
| Create new database (always truncate) | _dbm.open('file', 'n', 0o666) | Always create a new database, truncating if exists, with specified mode bits |
https://docs.python.org/3.10/library/_dbm.html
⚠️ The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above.
builtins.OSError(builtins.Exception)
errorMethod resolution order:
errorbuiltins.OSErrorbuiltins.Exceptionbuiltins.BaseExceptionbuiltins.objectData descriptors defined here:
__weakref__ — list of weak references to the object (if defined)Methods inherited from builtins.OSError:
__init__(self, /, *args, **kwargs) — Initialize self. See help(type(self)) for accurate signature.__reduce__(...) — Helper for pickle.__str__(self, /) — Return str(self).Static methods inherited from builtins.OSError:
__new__(*args, **kwargs) from builtins.type — Create and return a new object. See help(type) for accurate signature.Data descriptors inherited from builtins.OSError:
characters_writtenerrno — POSIX exception codefilename — exception filenamefilename2 — second exception filenamestrerror — exception strerrorMethods inherited from builtins.BaseException:
__delattr__(self, name, /) — Implement delattr(self, name).__getattribute__(self, name, /) — Return getattr(self, name).__repr__(self, /) — Return repr(self).__setattr__(self, name, value, /) — Implement setattr(self, name, value).__setstate__(...)with_traceback(...) — Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.Data descriptors inherited from builtins.BaseException:
__cause__ — exception cause__context__ — exception context__dict____suppress_context____traceback__argsopen(filename, flags='r', mode=438, /) — Return a database object.filename — The filename to open.flags — How to open the file. "r" for reading, "w" for writing, etc.mode — If creating a new file, the mode bits for the new file (e.g. os.O_RDWR).library = 'Berkeley DB'
/usr/lib/python3.10/lib-dynload/_dbm.cpython-310-x86_64-linux-gnu.so
Generated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-19 19:00 @216.73.216.114
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format