Jump to content

pyscripter

Members
  • Content Count

    1020
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by pyscripter


  1. 34 minutes ago, djxandytche said:

    create a singleton for the TPythonModule and TPyDelphiWrapper classes

    A single TPythonModule and TPyDelphiWrapper should do.

     

    34 minutes ago, djxandytche said:

    Wouldn't this cause problems with multi-threads since the DataSnap server can receive several requests at the same time?

    Running python code in threads is quite complex.  See PythonThreads · pyscripter/python4delphi Wiki (github.com) for details.


  2. On 12/29/2023 at 12:11 PM, delphivi said:

    Hello, Yes, I have read it

    Are you calling SetPythonHome, as suggested in that page?

     
    On 12/29/2023 at 12:11 PM, delphivi said:

    SetExceptionMask(exAllArithmeticExceptions);

    Have you tried 

    MaskFPUExceptions(True)

    instead?

     

    Is the Conda Library\bin subdirectory in the system path?  If not try adding it.


  3. 57 minutes ago, MarkShark said:

    Thanks!  Is using Searchbuf (unfortunately with the $if to fix this issue) ok to use as a solution to the SynEdit search engine issue I've been working on?  Otherwise, we'd need a reverse version of the current "Next" function which looks like it might be a Boyer-Moore implementation?

    Please open an issue and describe the problem.  Using SearchBuf should be OK.


  4. Features missing in the Delphi editor:

    • Proper Unicode handling 150265824-cbf6652a-bbbc-457c-9498-5f09f9b60423.png150266107-fdccabd2-c766-4ec3-a674-13abdf91e63b.png.fca55cb41c3776b50917149cf3ff988d.png.  It does not even support combining characters.
    • Multi-cursor/selection editing 
    • Modification (track changes) bar that works with undo.
    • Accessibility support
    • Drag & drop editing
    • triple and quadruple click support
    • double/triple click and drag support
    • Enhanced scroll bar as in VS Code
    • ...
    • Like 2

  5. Here is a lock-free implementation for your FHIROperationFactory function.

    var
      SingletonFHIROperationFactory : IFHIROperationFactory
    
    function FHIROperationFactory: IFHIROperationFactory;
    var
      LFHIROperationFactory: IFHIROperationFactory;
    begin
      if SingletonFHIROperationFactory = nil then
      begin
        LFHIROperationFactory :=  TFHIROperationFactory.Create;
        if InterlockedCompareExchangePointer(Pointer(SingletonFHIROperationFactory),
          Pointer(LFHIROperationFactory), nil) = nil
        then
          SingletonFHIROperationFactory._AddRef;
      end;
      Result := SingletonFHIROperationFactory;
    end;

    Delphi does something similar in some places.


  6. The Embarcadero fork of P4D, is often ahead of the PyScripter repo, but it is currently behind.   Its main focus is the generation of the delphivcl and delphifmx  extension modules as well as Android support.  The two repos are synced regularly.  I am only responsible for the pyscripter P4D home repo.   In most cases it does not matter which one you use.

×