当我使用 argparse 时,例如:
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-i", "--input", action="store")
那么帮助菜单是这样的:
usage: test.py [-h] [-i INPUT]
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
input file
如果我不想要--input INPUT
这里,我该怎么办?像这样:
usage: test.py [-h] [-i INPUT]
options:
-h, --help show this help message and exit
-i INPUT input file