import contextlib
import random
-ap = argparse.ArgumentParser(description = "Generate a random password")
+# argparse apparently uses descriptions as old-style format strings
special = ''.join(string.punctuation).translate({ord('%'): '%%'})
+
+ap = argparse.ArgumentParser(description = "Generate a random password")
arg_specs = [
(['-db'], {'help': "SQLite connect string (e.g. file path) to word list database"}),
(['-t'], {'help': "Type of password to generate", 'choices': ['chbs', 'chars']}),