我正在使用python的argparse来处理参数的解析.我得到一个默认的帮助消息,结构如下:
usage: ProgramName [-h] ...
Description
positional arguments:
...
optional arguments:
-h, --help show this help message and exit
...
Run Code Online (Sandbox Code Playgroud)
我想要的是在此消息中添加一个全新的部分,例如:
usage: ProgramName [-h] ...
Description
positional arguments:
...
optional arguments:
-h, --help show this help message and exit
...
additional information:
This will show additional information relevant to the user.
....
Run Code Online (Sandbox Code Playgroud)
有没有办法实现这种行为?python 2.7和3.x都支持的解决方案是首选.
编辑:我还希望有一个解决方案,将在帮助消息的底部添加新的部分/部分.