From bea722fdbabe67403488ee774749034e2918d8f3 Mon Sep 17 00:00:00 2001 From: Chapin Bryce Date: Tue, 26 Nov 2019 20:05:21 -0500 Subject: [PATCH] Updated opening_sqlite.py Added author attribution in argparse. --- sections/section_06/opening_sqlite.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sections/section_06/opening_sqlite.py b/sections/section_06/opening_sqlite.py index 35c5a6a..56af1e3 100644 --- a/sections/section_06/opening_sqlite.py +++ b/sections/section_06/opening_sqlite.py @@ -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)