MultiOption

class lib.cli.actions.MultiOption(*args, **kwargs)

Bases: Action

Adds support for multiple option checkboxes in the GUI.

This is a standard argparse.Action (with stock parameters) which indicates to the GUI that the options passed should be rendered as a group of Radio Buttons rather than a combo box.

The choices parameter must be provided as this provides the valid option choices.

Example

>>> argument_list = []
>>> argument_list.append(dict(
>>>        opts=("-f", "--foobar"),
>>>        action=MultiOption,
>>>        choices=["foo", "bar"))

Methods Summary

__call__(parser, namespace, values[, ...])

Call self as a function.

format_usage()

Methods Documentation

__call__(parser, namespace, values, option_string=None) None

Call self as a function.

Return type:

None

format_usage()
__call__(parser, namespace, values, option_string=None) None

Call self as a function.

Return type:

None