Python using diferent options multiple times with argparse
问题 I am working on a custom Nagios script in which I would like to implement parsing of command line arguments in the same way that is used on existing Nagios Plugin check_disk . In that plugin you have an option parameter -C to Clear current config and start over with new parameters. Extracted from check_disk help: check_disk -w 100 -c 50 -C -w 1000 -c 500 -p /foo -C -w 5% -c 3% -p /bar ----(3)----- ---------(1)---------- --------(2)-------- Checks warning/critical thresholds: for volume /foo