pyscripter / python4delphi

Free components that wrap up Python into Delphi and Lazarus (FPC)
MIT License
906 stars 310 forks source link

VALUE=NONE #403

Closed Uefi1 closed 1 year ago

Uefi1 commented 1 year ago

Hi I can't get the script execution value

function pyscript:string;
var
 PythonEngine1:TPythonEngine;
 PythonDelphiVar1:TPythonDelphiVar;
begin
  PythonEngine1:=TPythonEngine.Create(nil);
  PythonDelphiVar1:=TPythonDelphiVar.Create(nil);
  PythonDelphiVar1.Engine:=PythonEngine1;
  //PythonEngine1.DLLName := 'python310.dll';
  PythonEngine1.LoadDll;
  PythonEngine1.ExecString('print("Hello World")');
  Result:=( 'Value = ' + PythonDelphiVar1.ValueAsString );
  FreeAndNil(PythonEngine1);
  FreeAndNil(PythonDelphiVar1);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
memo2.Lines.Add(pyscript);
end;

VALUE=NONE

juanccilleruelo commented 1 year ago

I think I can help you with this problem, but I believe, too, that this is not the appropriate forum. Please, create an account in the Delphi Praxis forums and make the message again.

Python4Delphi in Delphi Praxis

Thanks!

Uefi1 commented 1 year ago

I think I can help you with this problem, but I believe, too, that this is not the appropriate forum. Please, create an account in the Delphi Praxis forums and make the message again.

Sorry, I can not register on all forums in the world to solve some of the my problems

pyscripter commented 1 year ago

The is the Issue Tracker and not a support forum. I you want help, please use the support forum.