run_python_script#

TcpOslServer.run_python_script(script: str, args: Sequence[object] | None = None) Tuple[str, str]#

Load a Python script in a project context and execute it.

Parameters:
scriptstr

Python commands to be executed on the server.

argsSequence[object], None, optional

Sequence of arguments used in Python script. Defaults to None.

Returns:
Tuple[str, str]

STDOUT and STDERR from executed Python script.

Raises:
OslCommunicationError

Raised when an error occurs while communicating with server.

OslCommandError

Raised when the command or query fails.

TimeoutError

Raised when the timeout float value expires.