pyTooling.CLIAbstraction.OptionalValuedFlag
Todo
Write module documentation.
Classes
OptionalValuedFlag
: Class and base-class for all OptionalValuedFlag classes, which represents a flag argument with data.ShortOptionalValuedFlag
: Represents aOptionalValuedFlag
with a single dash.LongOptionalValuedFlag
: Represents aOptionalValuedFlag
with a double dash.WindowsOptionalValuedFlag
: Represents aOptionalValuedFlag
with a single slash.
Classes
- class pyTooling.CLIAbstraction.OptionalValuedFlag.OptionalValuedFlag[source]
Class and base-class for all OptionalValuedFlag classes, which represents a flag argument with data.
An optional valued flag is a flag name followed by a value. The default delimiter sign is equal (
=
). Name and value are passed as one argument to the executable even if the delimiter sign is a whitespace character. If the value is None, no delimiter sign and value is passed.Example:
width=100
Inheritance
- AsArgument()[source]
Convert this argument instance to a string representation with proper escaping using the matching pattern based on the internal name and optional value.
- Return type:
- Returns:
Formatted argument.
- Raises:
ValueError – If internal name is None.
- __str__()[source]
Return a string representation of this argument instance.
- Return type:
- Returns:
Argument formatted and enclosed in double quotes.
- __repr__()
Return a string representation of this argument instance.
- Return type:
- Returns:
Argument formatted and enclosed in double quotes.
- class pyTooling.CLIAbstraction.OptionalValuedFlag.ShortOptionalValuedFlag[source]
Represents a
OptionalValuedFlag
with a single dash.Example:
-optimizer=on
Inheritance
- AsArgument()
Convert this argument instance to a string representation with proper escaping using the matching pattern based on the internal name and optional value.
- Return type:
- Returns:
Formatted argument.
- Raises:
ValueError – If internal name is None.
- __repr__()
Return a string representation of this argument instance.
- Return type:
- Returns:
Argument formatted and enclosed in double quotes.
- class pyTooling.CLIAbstraction.OptionalValuedFlag.LongOptionalValuedFlag[source]
Represents a
OptionalValuedFlag
with a double dash.Example:
--optimizer=on
Inheritance
- AsArgument()
Convert this argument instance to a string representation with proper escaping using the matching pattern based on the internal name and optional value.
- Return type:
- Returns:
Formatted argument.
- Raises:
ValueError – If internal name is None.
- __repr__()
Return a string representation of this argument instance.
- Return type:
- Returns:
Argument formatted and enclosed in double quotes.
- class pyTooling.CLIAbstraction.OptionalValuedFlag.WindowsOptionalValuedFlag[source]
Represents a
OptionalValuedFlag
with a single slash.Example:
/optimizer:on
Inheritance
- AsArgument()
Convert this argument instance to a string representation with proper escaping using the matching pattern based on the internal name and optional value.
- Return type:
- Returns:
Formatted argument.
- Raises:
ValueError – If internal name is None.
- __repr__()
Return a string representation of this argument instance.
- Return type:
- Returns:
Argument formatted and enclosed in double quotes.