smartinspectpython.siinspectorviewercontext

Represents the inspector viewer in the Console which displays key/value pairs in an object inspector control.

The inspector viewer in the Console interprets the Log Entry Data as a key/value list with group support like object inspectors from popular IDEs. This class takes care of the necessary formatting and escaping required by the corresponding inspector viewer in the Console.

You can use the SIInspectorViewerContext class for creating custom log methods around SISession.LogCustomContext for sending custom data organized as grouped key/value pairs.

Threadsafety:

This class is not guaranteed to be thread-safe.

SIInspectorViewerContext()

Initializes a new instance of the class.

def EscapeItem(self, item: str) -> str:

Overridden. 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.

def StartGroup(self, group: str) -> None:

Starts a new group.

Arguments:
  • group (str): The name of the group to use.