diff options
author | Raymond Hettinger <python@rcn.com> | 2004-10-20 07:17:16 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-10-20 07:17:16 (GMT) |
commit | e54e726f0bce70d2999b8e79afe5d336b0bcfed3 (patch) | |
tree | 6cba47177d48a00d373bf388e26f5f1753e3843e /Lib/whichdb.py | |
parent | 76e60d687dde9d987f39e16f8fe7814daf1f1e26 (diff) | |
download | cpython-e54e726f0bce70d2999b8e79afe5d336b0bcfed3.zip cpython-e54e726f0bce70d2999b8e79afe5d336b0bcfed3.tar.gz cpython-e54e726f0bce70d2999b8e79afe5d336b0bcfed3.tar.bz2 |
SF patch #1038388: __main__ for whichdb.py
(Contributed by Oleg Broytmann.)
Diffstat (limited to 'Lib/whichdb.py')
-rw-r--r-- | Lib/whichdb.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/whichdb.py b/Lib/whichdb.py index deb8a02..cc5ced3 100644 --- a/Lib/whichdb.py +++ b/Lib/whichdb.py @@ -1,3 +1,4 @@ +# !/usr/bin/env python """Guess which db package to use to open a db file.""" import os @@ -110,3 +111,7 @@ def whichdb(filename): # Unknown return "" + +if __name__ == "__main__": + for filename in sys.argv[1:]: + print whichdb(filename) or "UNKNOWN", filename |