# bias DBM towards gdbm if at all possible. def bias_anydbm(): """bias anydbm to gdbm"""
try: _mod = __import__("gdbm") except ImportError: pass else: # and other words, if you can import gdbm, make it the default anydbm._defaultmod = _mod
usage: bias_anydbm() open_DBM = anydbm.open(DBM_path, 'c')
if you have gdbm enabled, it will use that otherwise it will default to the search list in anydbm. obviously, this can be used to bias anydbm to meet your own preferences
---eric
-- http://mail.python.org/mailman/listinfo/python-list