You can add options to the help text.
parser=argparse.ArgumentParser() parser.add_argument('-f',metavar="TEST",choices=('a','b','c'), help='choices, {%(choices)s}') print parser.format_help()
gives:
usage: stack20328931.py [-h] [-f TEST] optional arguments: -h, --help show this help message and exit -f TEST choices, {a, b, c}
source share