usertools: replace optparse with argparse
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 4 Nov 2020 06:48:41 +0000 (22:48 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 22 Nov 2020 21:16:04 +0000 (22:16 +0100)
commit81255f27c65c7f42f50ee8dfb0feeb40c36c4c61
treedc6482c0c022573d2e9a451dc6bc05dab9fff63b
parentc358ba7a17328172e2e9cdccb7a75fc2cf897de8
usertools: replace optparse with argparse

The optparse module is deprecated and replaced with new argparse.
Using the python standard argument parser instead of C library
style getopt gives a number of advantages such as checking
for conflicting arguments, restricting choices, and automatically
generating help messages.

Some of the help messages are now less wordy.

The code now enforces the rule that only one of the pmdinfo formats
can be specified: raw or json.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
usertools/dpdk-devbind.py
usertools/dpdk-pmdinfo.py