亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

使用 argparse 從 --help 標志中獲取幫助菜單的某個部分

使用 argparse 從 --help 標志中獲取幫助菜單的某個部分

翻閱古今 2021-10-26 10:44:34
在我的一個--help程序中傳遞時,我有一個非常長的幫助菜單:optional arguments:  -h, --help            show this help message and exitmandatory arguments:  arguments that have to be passed for the program to run  -u URL, --url URL     Pass a single URL to detect the protection...request arguments:  arguments that will control your requests  --pa USER-AGENT       Provide your own personal agent to use it for the HTTP...encoding options:  arguments that control the encoding of payloads  -e PAYLOAD [TAMPER-SCRIPT-LOAD-PATH ...], --encode PAYLOAD [TAMPER-SCRIPT-LOAD-PATH ...]...output options:  arguments that control how WhatWaf handles output  -F, --format          Format the output into a dict and display it...misc arguments:  arguments that don't fit in any other category  --verbose             Run in verbose mode (more output)...構建參數的結構如下所示:        mandatory = parser.add_argument_group("mandatory arguments",                                              "arguments that have to be passed for the program to run")        mandatory.add_argument("-u", "--url", dest="runSingleWebsite", metavar="URL",                               help="Pass a single URL to detect the protection")...        req_args = parser.add_argument_group("request arguments",                                             "arguments that will control your requests")        req_args.add_argument("--pa", dest="usePersonalAgent", metavar="USER-AGENT",                              help="Provide your own personal agent to use it for the HTTP requests")...
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 338 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號