I want to construct a argparser help message that looks like:
-i, --input=INPUT help for input
-o, --output=output help for output
My current code:
arg_parser = argparse.ArgumentParser
arg_parser.add_argument('-i', '--input', dest='input', metavar='=INPUT', help='help for input')
arg_parser.add_argument('-o', '--output', dest='output', metavar='=OUTPUT', help='help for output')
arg_parser.print_help()
is giving me
-i =INPUT, --input =INPUT help for input
-o =INPUT, --output =output help for output
I just want to know how to get rid of the things in between short and long options.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…