I have command line argument -S
as defined below
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
'-S',
'--save',
action='store_true',
help='Save to directory'
)
but if I use -SS instead of -S, python doesn't throw any error. I want invalid argument error. Can anybody tell me how to achieve this?