ListOptionAction
Custom argparse action for ogrinspect keywords that require a string list. If the string is 'True'/'true' then the option value will be a boolean instead.
Attributes
| Attribute | Type | Description |
|---|---|---|
| dest | string | The name of the attribute on the namespace object where the parsed list or boolean value will be stored. |
Constructor
Signature
def ListOptionAction(
option_strings: list,
dest: string,
nargs: int|string,
const: any,
default: any,
type: type,
choices: container,
required: boolean = False,
help: string,
metavar: string
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| option_strings | list | A list of command-line option strings which should be associated with this action. |
| dest | string | The name of the attribute to hold the created object. |
| nargs | `int | string` |
| const | any | The value to be used if the action is selected but no arguments are consumed. |
| default | any | The value to be used if the option is not present on the command line. |
| type | type | The type to which the command-line argument should be converted. |
| choices | container | A container of the allowable values for the argument. |
| required | boolean = False | Whether or not the command-line option may be omitted. |
| help | string | A brief description of what the argument does. |
| metavar | string | A name for the argument in usage messages. |