run_python_file#
- TcpOslServer.run_python_file(file_path: str | Path, args: Sequence[object] | None = None) Tuple[str, str]#
Read python script from the file, load it in a project context and execute it.
- Parameters:
- file_path
Union[str,pathlib.Path] Path to the Python script file which content is supposed to be executed on the server.
- args
Sequence[object],None,optional Sequence of arguments used in Python script. Defaults to
None.
- file_path
- Returns:
- Raises:
FileNotFoundErrorRaised when the specified Python script file does not exist.
OslCommunicationErrorRaised when an error occurs while communicating with server.
OslCommandErrorRaised when the command or query fails.
TimeoutErrorRaised when the timeout float value expires.