smartinspectpython.sivaluelistviewercontext
Module: sivaluelistviewercontext.py
Revision History
Date | Version | Description |
---|---|---|
2023/05/30 | 3.0.0.0 | Initial Version. |
Represents the value list viewer in the Console which can display data as a key/value list.
The value list viewer in the Console interprets the Log Entry Data as a simple key/value list. Every line in the text data is interpreted as one key/value item of the list. This class takes care of the necessary formatting and escaping required by the corresponding value list viewer of the Console.
You can use the SIValueListViewerContext class for creating custom log methods around SISession.LogCustomContext for sending custom data organized as key/value lists.
Threadsafety:
This class is not guaranteed to be thread-safe.
Initializes a new instance of the class.
Arguments:
- vi (SIViewerId): The viewer ID to use; SIViewerId.ValueList will be used if value is null.
Adds an entry to the current row.
Arguments:
- key (str): The key to use.
- value (str): The entry to add; must be able to be converted to a string via the "str(x)" syntax.
Escapes a key or a value.
Arguments:
- item (str): The key or value to escape.
Returns:
The escaped key or value.
This method ensures that the escaped key or value does not contain any newline characters, such as the carriage return or linefeed characters. Furthermore, it escapes the '' and '=' characters.