smartinspectpython.sitableviewercontext
Represents the table viewer in the Console which can display text data as a table.
The table viewer in the Console interprets the Log Entry Data as a table. This class takes care of the necessary formatting and escaping required by the corresponding table viewer in the Console.
You can use the SITableViewerContext class for creating custom log methods around SISession.LogCustomContext for sending custom data organized as tables.
Threadsafety:
This class is not guaranteed to be thread-safe.
def
AddRowEntry(self, entry) -> None:
Adds an entry to the current row.
Arguments:
- entry (object): The entry to add; must be able to be converted to a string via the "str(x)" syntax.
def
AppendHeader(self, header: str) -> None:
Appends a header to the text data.
Arguments:
- (str): The header to append.
@staticmethod
def
EscapeCSVEntry(entry: str) -> str:
Escapes a CSV (comma separated values) formatted entry.
Arguments:
- entry (str): The CSV entry to escape.
Returns:
The escaped line.
This method ensures that the escaped CSV entry does not contain whitespace characters, and that quoted values are escaped properly.