Whilst Python4Lazarus installs, I am having difficulty running the simple test prog below. The program accepts an input script print(2+2) however the PythonGUIInputOutput module simple clears the TREDIT output Tmemo. This suggests that the PythonEngine1 is outputting something to the PGIO which overrides the TREDIT with nulls. Additionally if the input script is miss-entered as print(2+A) the unit ends with the expected exception.
My windows system is 8.1 32bit and Python version 3.7. With the PythonEngine correctly showing script errors and the PythonGUIInputOutput resopnding, can it be that Python3.7 does not work in this environment ?
I would be grateful for any comments.
Thanks Docwat
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, SynHighlighterPython, Forms, Controls, Graphics,
Dialogs, StdCtrls, PythonGUIInputOutput, PythonEngine;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Memo1: TMemo;
TREDIT: TMemo;
PythonEngine1: TPythonEngine;
PythonGUIInputOutput1: TPythonGUIInputOutput;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
PythonEngine1.ExecStrings(Memo1.Lines);
end;
end.