[24.03 RFC] argparse: add argparse library
Stephen Hemminger
stephen at networkplumber.org
Wed Jan 24 16:54:57 CET 2024
On Tue, 21 Nov 2023 12:26:51 +0000
Chengwen Feng <fengchengwen at huawei.com> wrote:
> Introduce argparse library (which was inspired by the thread [1]),
> compared with getopt, the argparse has following advantages:
> 1) Set the help information when defining parameters.
> 2) Support positional parameters.
>
> The parameters parsing according following:
> 1) positional: use callback to parse (passed the long-name as the key
> for callback).
> 2) optional:
> In addition to callback to parse, but also support:
> 2.1) no-val: support set default value to saver.
> 2.2) has-val: support set value to saver, the value must be conform
> RTE_ARGPARSE_ARG_VAL_xxx.
> 2.3) opt-val: if current without value then treat as no-val, else could
> treat as has-val.
How compatiable is this with Python or other implementations of argparse
in C?
More information about the dev
mailing list