python argparse only allow certain values code example
Example: python argparse only allow certain values
...
parser.add_argument('--val',
choices=['a', 'b', 'c'],
help='Special testing value')
args = parser.parse_args(sys.argv[1:])