pyTooling.CLIAbstraction.ValuedFlagList

List of valued flags are argument lists where each item is a valued flag (See ValuedFlag).

Each list item gets translated into a ***ValuedFlag, with the same flag name, but differing values.

See also

Classes


Classes

class pyTooling.CLIAbstraction.ValuedFlagList.ValuedFlagList[source]

Class and base-class for all ValuedFlagList classes, which represents a list of valued flags.

Each list element gets translated to a valued flag using the pattern for formatting. See ValuedFlag for more details on valued flags.

Example:

  • file=file1.log file=file2.log

Inheritance

Inheritance diagram of ValuedFlagList

static __new__(cls, *args, **kwargs)[source]
Parameters:
__init__(value)[source]
Parameters:

value (List[ValueT])

Return type:

None

property Value: List[str]

Get the internal value.

Returns:

Internal value.

AsArgument()[source]

Convert this argument instance to a string representation with proper escaping using the matching pattern based on the internal name and value.

Return type:

Union[str, Iterable[str]]

Returns:

Formatted argument.

Raises:

ValueError – If internal name is None.

__str__()[source]

Return a string representation of this argument instance.

Return type:

str

Returns:

Space separated sequence of arguments formatted and each enclosed in double quotes.

__repr__()[source]

Return a string representation of this argument instance.

Return type:

str

Returns:

Comma separated sequence of arguments formatted and each enclosed in double quotes.

property Name: str

Get the internal name.

Returns:

Internal name.

class pyTooling.CLIAbstraction.ValuedFlagList.ShortValuedFlagList[source]

Represents a ValuedFlagArgument with a single dash.

Example:

  • -file=file1.log -file=file2.log

Inheritance

Inheritance diagram of ShortValuedFlagList

static __new__(cls, *args, **kwargs)[source]
Parameters:
AsArgument()

Convert this argument instance to a string representation with proper escaping using the matching pattern based on the internal name and value.

Return type:

Union[str, Iterable[str]]

Returns:

Formatted argument.

Raises:

ValueError – If internal name is None.

property Name: str

Get the internal name.

Returns:

Internal name.

property Value: List[str]

Get the internal value.

Returns:

Internal value.

__init__(value)
Parameters:

value (List[ValueT])

Return type:

None

__repr__()

Return a string representation of this argument instance.

Return type:

str

Returns:

Comma separated sequence of arguments formatted and each enclosed in double quotes.

__str__()

Return a string representation of this argument instance.

Return type:

str

Returns:

Space separated sequence of arguments formatted and each enclosed in double quotes.

class pyTooling.CLIAbstraction.ValuedFlagList.LongValuedFlagList[source]

Represents a ValuedFlagArgument with a double dash.

Example:

  • --file=file1.log --file=file2.log

Inheritance

Inheritance diagram of LongValuedFlagList

static __new__(cls, *args, **kwargs)[source]
Parameters:
AsArgument()

Convert this argument instance to a string representation with proper escaping using the matching pattern based on the internal name and value.

Return type:

Union[str, Iterable[str]]

Returns:

Formatted argument.

Raises:

ValueError – If internal name is None.

property Name: str

Get the internal name.

Returns:

Internal name.

property Value: List[str]

Get the internal value.

Returns:

Internal value.

__init__(value)
Parameters:

value (List[ValueT])

Return type:

None

__repr__()

Return a string representation of this argument instance.

Return type:

str

Returns:

Comma separated sequence of arguments formatted and each enclosed in double quotes.

__str__()

Return a string representation of this argument instance.

Return type:

str

Returns:

Space separated sequence of arguments formatted and each enclosed in double quotes.

class pyTooling.CLIAbstraction.ValuedFlagList.WindowsValuedFlagList[source]

Represents a ValuedFlagArgument with a single slash.

Example:

  • /file:file1.log /file:file2.log

Inheritance

Inheritance diagram of WindowsValuedFlagList

AsArgument()

Convert this argument instance to a string representation with proper escaping using the matching pattern based on the internal name and value.

Return type:

Union[str, Iterable[str]]

Returns:

Formatted argument.

Raises:

ValueError – If internal name is None.

property Name: str

Get the internal name.

Returns:

Internal name.

property Value: List[str]

Get the internal value.

Returns:

Internal value.

__init__(value)
Parameters:

value (List[ValueT])

Return type:

None

static __new__(cls, *args, **kwargs)[source]
Parameters:
__repr__()

Return a string representation of this argument instance.

Return type:

str

Returns:

Comma separated sequence of arguments formatted and each enclosed in double quotes.

__str__()

Return a string representation of this argument instance.

Return type:

str

Returns:

Space separated sequence of arguments formatted and each enclosed in double quotes.