Movatterモバイル変換


[0]ホーム

URL:


Up one LevelPython Library ReferenceContentsModule IndexIndex

13.10dbhash -- DBM-style interface to the BSD database library

Thedbhash module provides a function to open databases usingthe BSDdb library. This module mirrors the interface of theother Python database modules that provide access to DBM-styledatabases. Thebsddb module is required to usedbhash.

This module provides an exception and a function:

exception error
Exception raised on database errors other thanKeyError. It is a synonym forbsddb.error.

open(path[, flag[, mode]])
Open adb database and return the database object. Thepath argument is the name of the database file.

Theflag argument can be'r' (the default),'w','c' (which creates the database if it doesn't exist), or'n' (which always creates a new empty database). For platforms on which the BSDdb library supports locking, an "l" can be appended to indicate that locking should be used.

The optionalmode parameter is used to indicate theUnix permission bits that should be set if a new database must be created; this will be masked by the current umask value for the process.

See Also:

Moduleanydbm:
Generic interface todbm-style databases.
Modulebsddb:
Lower-level interface to the BSDdb library.
Modulewhichdb:
Utility module used to determine the type of an existing database.



Subsections


Up one LevelPython Library ReferenceContentsModule IndexIndex

Release 2.5.2, documentation updated on 21st February, 2008.
SeeAbout this document... for information on suggesting changes.
[8]ページ先頭

©2009-2025 Movatter.jp