Skip to content

How can I output the results of a py script? #462

Closed
@Uefi1

Description

@Uefi1

Hello, how can I output the results to a string variable of a .py script running in a multi-threaded application ?

function ExecPythonFile(const Filename):string;
var
FGILState: PyGILstate_STATE;
begin
Result := '';
FGILState := PythonEngine.PyGILState_Ensure;
try
PythonEngine.ExecFile(Filename);
except
PythonEngine.IO.Write(Result); //No WORK ((((
end;
PythonEngine.PyGILState_Release(FGILState);
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions