diff options
author | Skip Montanaro <skip@pobox.com> | 2001-03-01 04:13:51 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2001-03-01 04:13:51 (GMT) |
commit | 58eadbaf1289f8671e435fb3a00e9e0351abbc16 (patch) | |
tree | aec4ac2ee8ae4bd65a7f2fa7b7079f072664c328 | |
parent | 59ade080796be93cbe31f3c0c339f8e5756e9a1d (diff) | |
download | cpython-58eadbaf1289f8671e435fb3a00e9e0351abbc16.zip cpython-58eadbaf1289f8671e435fb3a00e9e0351abbc16.tar.gz cpython-58eadbaf1289f8671e435fb3a00e9e0351abbc16.tar.bz2 |
move import into function to avoid having to add an __all__ list...
-rw-r--r-- | Lib/whichdb.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/whichdb.py b/Lib/whichdb.py index 4396321..1f12099 100644 --- a/Lib/whichdb.py +++ b/Lib/whichdb.py @@ -1,7 +1,5 @@ """Guess which db package to use to open a db file.""" -import struct - def whichdb(filename): """Guess which db package to use to open a db file. @@ -15,6 +13,8 @@ def whichdb(filename): database using that module may still fail. """ + import struct + # Check for dbm first -- this has a .pag and a .dir file try: f = open(filename + ".pag", "rb") |