LayerOptionAction
Custom argparse action for the ogrinspect layer_key keyword option which may be an integer or a string.
Attributes
| Attribute | Type | Description |
|---|---|---|
| dest | string | The name of the attribute on the namespace object where the parsed layer identifier (either an integer index or a string name) will be stored. |
Constructor
Signature
def LayerOptionAction(
option_strings: list,
dest: string,
nargs: int|str,
const: any,
default: any,
type: callable,
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 | str` |
| const | any | The value to be used if the option is specified without an argument. |
| default | any | The value to be used if the option is not specified. |
| type | callable | The type to which the command-line argument should be converted. |
| choices | container | A container of the allowed values for the argument. |
| required | boolean = False | Whether the command-line option is required. |
| help | string | A brief description of what the argument does. |
| metavar | string | A name for the argument in usage messages. |