diff roundup/anypy/dbm_.py @ 4360:661466ba19cd

add missing file
author Richard Jones <richard@users.sourceforge.net>
date Tue, 23 Feb 2010 22:54:59 +0000
parents
children 0d9369d35483
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/roundup/anypy/dbm_.py	Tue Feb 23 22:54:59 2010 +0000
@@ -0,0 +1,12 @@
+# In Python 3 the "anydbm" module was renamed to be "dbm" which is now a
+# package containing the various implementations. The "wichdb" module's
+# whichdb() function was moved to the new "dbm" module.
+
+try:
+    # old school first because <3 had a "dbm" module too...
+    import anydbm
+    from whichdb import whichdb
+except ImportError:
+    # python 3+
+    import dbm as anydbm
+    whichdb = anydbm.whichdb

Roundup Issue Tracker: http://roundup-tracker.org/