Staging
v0.5.1
https://github.com/python/cpython
Revision 7865296ca3e6fb179860c899b3a3a198e6f317c1 authored by Philip Jenvey on 29 September 2009, 19:18:11 UTC, committed by Philip Jenvey on 29 September 2009, 19:18:11 UTC
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75143 | philip.jenvey | 2009-09-29 12:10:15 -0700 (Tue, 29 Sep 2009) | 5 lines

  #5329: fix os.popen* regression from 2.5: don't execute commands as a sequence
  through the shell. also document the correct subprocess replacement for this
  case
  patch from Jean-Paul Calderone and Jani Hakala
........
1 parent b4b94ef
Raw File
Tip revision: 7865296ca3e6fb179860c899b3a3a198e6f317c1 authored by Philip Jenvey on 29 September 2009, 19:18:11 UTC
Merged revisions 75143 via svnmerge from
Tip revision: 7865296
dbhash.py
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""

import sys
if sys.py3kwarning:
    import warnings
    warnings.warnpy3k("in 3.x, dbhash has been removed", DeprecationWarning, 2)
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