mirror of
https://github.com/python/cpython
synced 2024-07-21 10:15:53 +00:00
SF patch #1038388: __main__ for whichdb.py
(Contributed by Oleg Broytmann.)
This commit is contained in:
parent
76e60d687d
commit
e54e726f0b
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue