mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
SF patch #1038388: __main__ for whichdb.py
(Contributed by Oleg Broytmann.)
This commit is contained in:
parent
76e60d687d
commit
e54e726f0b
2 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -22,6 +22,8 @@ Extension Modules
|
|||
Library
|
||||
-------
|
||||
|
||||
- The whichdb module can now be run from the command line.
|
||||
|
||||
- Bug #1045381: time.strptime() can now infer the date using %U or %W (week of
|
||||
the year) when the day of the week and year are also specified.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue