parser.argparse.ArgumentParser()
# parser.add_args here
# sys.argv includes a list of elements starting with the program
if len(sys.argv) < 2:
parser.print_usage()
sys.exit(1)
To create an option that needs no value, set the action [docs]
of it to 'store_const', 'store_true' or 'store_false'.
Example:
parser.add_argument('-v', '--verbosity', action='store_true')
! No 'type=xy' is needed !
parser.add_argument("-a", "--automatic", nargs="?", const=8, type=int)