Updated opening_sqlite.py

Added author attribution in argparse.
This commit is contained in:
Chapin Bryce 2019-11-26 20:05:21 -05:00 committed by GitHub
parent 3fe34bd613
commit bea722fdba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,4 @@
"""Example for opening and exploring Sqlite databased
for your command line utility.
"""Example for opening and exploring Sqlite database.
Example Usage:
@ -82,7 +81,11 @@ def list_tables(conn):
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(
description=__desc__,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
epilog=f"Built by {__author__}, v.{__date__}"
)
parser.add_argument("db", help="path to the database to read")
args = parser.parse_args()
conn = open_sqlite(args.db)