Jump to content

Paschalis

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello @Juan C.Cilleruelo and @AndreasSt, I had the same issue and managed to retrieve the TPythonDelphiVar like this. function TPythonViewModel.GetDelphiVar: string; var PyResult: PPyObject; begin FPythonDelphiVar.Engine := FPythonEngine; FPythonDelphiVar.Module := '__main__'; FPythonDelphiVar.VarName := 'DelphiVar'; FPythonDelphiVar.Initialize; FPythonEngine.ExecString('DelphiVar ="Hello"'); PyResult := FPythonEngine.EvalString('DelphiVar'); if PyResult <> nil then Result := FPythonEngine.PyObjectAsString(PyResult) else Result := 'Error: EvalString returned nil'; end;
×