Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running python code in Delphi threads issue #458

Closed
KhurshedUlugov opened this issue Jan 6, 2024 · 1 comment
Closed

Running python code in Delphi threads issue #458

KhurshedUlugov opened this issue Jan 6, 2024 · 1 comment

Comments

@KhurshedUlugov
Copy link

KhurshedUlugov commented Jan 6, 2024

It's a continuation of a theme #457

Unfortunately, nothing works. None of the methods given in the article (https://github.com/pyscripter/python4delphi/wiki/PythonThreads#tpythonthread-properties). There is simply no response. I have logging, but nothing is written in the log.

What am I doing wrong? Python embedded version is 3.8. Delphi 11.3

Here is my code:

    ThreadPythonExec(
    procedure
    begin
      GetPythonEngine.ExecFile(PyFileName);
    end{, nil, false, emNewInterpreter});

    Task := TTask.Create(
        procedure
        var
          Py: IPyEngineAndGIL;
        begin
          Py := SafePyEngine;
          Py.PythonEngine.ExecFile(PyFileName);
        end);
    Task.Start;
@pyscripter
Copy link
Owner

Please continue at the previous issue. Do not open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants