Table of Contents

Method RunPythonScriptViaApp

Namespace
Alternet.Common.Python
Assembly
Alternet.Common.Python.v10.dll

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 string

The Python script to execute as a string.

multiLineResult bool

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