get_command_line_option
Return the value of a command line option (which should include leading dashes, e.g. '--testrunner') from an argument list. Return None if the option wasn't passed or if the argument list couldn't be parsed.
def get_command_line_option(
argv: list,
option: string
) - > string
Return the value of a command line option (which should include leading dashes, e.g. '--testrunner') from an argument list. Return None if the option wasn't passed or if the argument list couldn't be parsed.
Parameters
| Name | Type | Description |
|---|---|---|
| argv | list | The list of command line arguments to search, typically starting from the third element to skip the executable and subcommand |
| option | string | The specific flag name to retrieve, including leading dashes (e.g., '--settings') |
Returns
| Type | Description |
|---|---|
string | The value associated with the specified command line option, or None if the option is missing or parsing fails |