home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 June / PCWorld_2005-06_cd.bin / software / vyzkuste / firewally / firewally.exe / framework-2.3.exe / dbhash.py < prev    next >
Text File  |  2003-12-30  |  404b  |  17 lines

  1. """Provide a (g)dbm-compatible interface to bsddb.hashopen."""
  2.  
  3. import sys
  4. try:
  5.     import bsddb
  6. except ImportError:
  7.     # prevent a second import of this module from spuriously succeeding
  8.     del sys.modules[__name__]
  9.     raise
  10.  
  11. __all__ = ["error","open"]
  12.  
  13. error = bsddb.error                     # Exported for anydbm
  14.  
  15. def open(file, flag = 'r', mode=0666):
  16.     return bsddb.hashopen(file, flag, mode)
  17.