[Python-checkins] python/dist/src/Lib whichdb.py,1.18,1.19

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Wed Oct 20 09:17:18 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5737/Lib

Modified Files:
	whichdb.py 
Log Message:
SF patch #1038388:  __main__ for whichdb.py
(Contributed by Oleg Broytmann.)



Index: whichdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/whichdb.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- whichdb.py	20 Oct 2003 14:01:51 -0000	1.18
+++ whichdb.py	20 Oct 2004 07:17:16 -0000	1.19
@@ -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 @@
 
     # Unknown
     return ""
+
+if __name__ == "__main__":
+    for filename in sys.argv[1:]:
+        print whichdb(filename) or "UNKNOWN", filename



More information about the Python-checkins mailing list