The dbhash module is used to open databases using the bsddb module, but with an interface that closely matches the interface of the other database modules.
open( filename [,flag=’r’ [, mode ])
Opens a DB database and returns the database object. A database object, d, returned by open() behaves like a dictionary and also provides the following methods:
|d.first()||Returns the first key in the database|
|d.last()||Returns the last key in a database traversal|
|d.next(key)||Returns the next key following key in the database|
|d.previous(key)||Returns the item that comes before key in a forward traversal of the database|
|d.sync()||Writes unsaved data to the disk|
Exception raised on database errors other than KeyError. Same as bsddb.error ...