Staging
v0.8.1
https://github.com/python/cpython
Revision 4a7da9cdbc2100e5b6c8b6d9da58ee8f5a813a96 authored by Georg Brandl on 07 March 2007, 09:34:52 UTC, committed by Georg Brandl on 07 March 2007, 09:34:52 UTC
1 parent b535b39
Raw File
Tip revision: 4a7da9cdbc2100e5b6c8b6d9da58ee8f5a813a96 authored by Georg Brandl on 07 March 2007, 09:34:52 UTC
Patch #1669331: clarify shutil.copyfileobj() behavior wrt. file position.
Tip revision: 4a7da9c
dbhash.py
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""

import sys
try:
    import bsddb
except ImportError:
    # prevent a second import of this module from spuriously succeeding
    del sys.modules[__name__]
    raise

__all__ = ["error","open"]

error = bsddb.error                     # Exported for anydbm

def open(file, flag = 'r', mode=0666):
    return bsddb.hashopen(file, flag, mode)
back to top