__init__.py 488 B

1234567891011121314151617181920
  1. from __future__ import absolute_import
  2. from future.utils import PY3
  3. if PY3:
  4. from dbm import *
  5. else:
  6. __future_module__ = True
  7. from whichdb import *
  8. from anydbm import *
  9. # Py3.3's dbm/__init__.py imports ndbm but doesn't expose it via __all__.
  10. # In case some (badly written) code depends on dbm.ndbm after import dbm,
  11. # we simulate this:
  12. if PY3:
  13. from dbm import ndbm
  14. else:
  15. try:
  16. from future.moves.dbm import ndbm
  17. except ImportError:
  18. ndbm = None