Method RunPythonScriptViaApp
RunPythonScriptViaApp(string, bool)
Executes a Python script using the application-defined method for running external commands. This method executes 'python' command using os command interpreter.
public static string RunPythonScriptViaApp(string script, bool multiLineResult = false)
Parameters
script
stringThe Python script to execute as a string.
multiLineResult
boolA boolean value indicating whether the output of the script should be treated as multi-line. If true, the output will include all lines; otherwise, only the first line will be returned.
Returns
- string
The output of the Python script as a string, or
null
if an error occurs during execution.
Remarks
It is assumed that script doesn't contain double quotes.