Method RunPythonFileViaApp
RunPythonFileViaApp(string, bool)
Executes a Python script file using the application-defined method for running external commands. This method executes the 'python' command with the specified script file path.
public static string RunPythonFileViaApp(string pathToScriptFile, bool multiLineResult = false)
Parameters
pathToScriptFile
stringThe full path to the Python script file to execute.
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.