Changing the metavar value in argparse only in argument listing and not in its Usage
问题 My question is similar to argparse help without duplicate ALLCAPS question. Though i would explain in brief what that question was and what my question is: I'd like to display argparse help for my options the same way the default -h,--help is, without the ALLCAPS text after each option, or at least without the duplicated CAPS. For example, with the following code: #filename=temp.py import argparse p = argparse.ArgumentParser() p.add_argument('-i', '--ini', help="use alternate ini file") print