Git Product home page Git Product logo

Comments (4)

Uefi1 avatar Uefi1 commented on June 19, 2024 1

I came to this conclusion after looking at how Vcl.PythonGUIInputOutput is implemented; in general, this entire Python4Delphi library is terribly and incomprehensibly written

from python4delphi.

Uefi1 avatar Uefi1 commented on June 19, 2024

I actually understood something: the console application does not intercept WM_USER and other messages that's why the event doesn't fire !!!!!

from python4delphi.

Uefi1 avatar Uefi1 commented on June 19, 2024

No, it turned out that this is not even the case: the console application does not accept messages; everything has been transferred to the form; the display also does not work! Generally a bug !

from python4delphi.

Uefi1 avatar Uefi1 commented on June 19, 2024

Doesn't work in any way and under no circumstances:

procedure TForm2.PythonInputOutputSendUniData(Sender: TObject;
  const Data: string);
begin
//PythonInputOutput.DisplayString(Data);
cs.Enter;
Memo1.Lines.Add('WORK'); //NOT (
cs.Leave;
end;

procedure TForm2.InitPython;
begin
  PythonEngine := TPythonEngine.Create(nil);
  try
    PythonInputOutput:=TPythonGUIInputOutput.Create(nil);
    PythonInputOutput.OnSendUniData:=PythonInputOutputSendUniData;
    PythonEngine.IO:=PythonInputOutput;
    PythonInputOutput.UnicodeIO:=True;
    PythonInputOutput.RawOutput := False;
    PythonInputOutput.DelayWrites:=True;
    PythonEngine.InitThreads := True;
    PythonEngine.UseLastKnownVersion := False;
    PythonEngine.DllPath := ExtractFilePath(ParamStr(0));
    PythonEngine.DllName := 'python310.dll';
    PythonEngine.AutoLoad := False;
    PythonEngine.AutoUnload := False;
    PythonEngine.AutoFinalize := True;
    PythonEngine.RedirectIO := True;
    PythonEngine.LoadDll;
    TPythonThread.Py_Begin_Allow_Threads;
  finally
//
  end;
end;

from python4delphi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.