-
Content Count
914 -
Joined
-
Last visited
-
Days Won
55
pyscripter last won the day on October 27
pyscripter had the most liked content!
Community Reputation
689 ExcellentTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Unlike DelphiVcl, DelphiFMX does not wrap Canvas. Both DelphiVcl and DelphiFmx are maintained by Embarcadero. There is a reported issue regarding BeginScene, but you may want to submit a broader one about Canvas support.
-
I committed a change trying to fix this. Could you please try once more.
-
python4delphi Add extra components without touch DelphiVCL
pyscripter replied to shineworld's topic in Python4Delphi
This is not correct. When P4D is used in an extension module it uses LoadDllInExtensionModule which just uses the dll loaded in the python process. It does not load or initialize the python dll. The calling process does that. So you can have more than one Delphi generated pyd files without issues. -
In the latest commit, multiple connections are handled in separate threads. So, Multiple Connections on LocalForward · Issue #11 · pyscripter/Ssh-Pascal is fixed. Seems to work fine, but could you please test it?
-
@dummzeuch Please see my latest commit. TSshTunnel.ForwardLocalPort has been refactored and can now handle multiple connections sequentially. So your use case may be working. Could you please test. I will also see whether the connections can be handled in parallel. Is there a use case for that? Can you have multiple connections simultaneously on the same port?
-
@dummzeuchI have updated the build scripts and the binaries which do not need OpenSSL. Could you please try the new binaries and see whether you still get the error you mentioned? These binaries work well with ssh-agent password-less authentication, whilst the Php ones don't. Also would it be possible to post a test project that requires multiple connections, so that I can have a go at fixing the issue?
-
Probably not. When you add commits to the same branch, the commits are added to the PR. If you want to have separate PRs you need different branches for each change. Anyway your changes have been merged and you are listed as a contributor.
-
@dummzeuch I think handling connections sequentially should be quite easy, without resorting to multiple threads. Once one is closed you wait for the next one. Please bear in mind, that there are limitations when using libssh2 from multiple threads: Points 1 and 3 are the same, since the crypto functions are initialized by libssh2_init. Ssh_pascal handles this in a thread safe manner. The second point, I think means that you either have a session per thread or you protect with a lock, access to the same session and its channels,
-
A Pull Request implementing an alternative design that resolves this issue would be much appreciated.
-
The code in SshTunnel.pas is based on this libssh2 example. Maybe I missed something, in converting it to Delphi. It would be nice to fix it.
-
@dummzeuch I have pushed a couple of fixes to SshTunnel.pas (issues found by Copilot!). Could you please check whether they make a difference? One of them might: SocketOption := 1; // Initialize SocketOption
-
See How can I import a .pyc compiled python file and use it - Stack Overflow
-
There are about 75 highlighters and It is not too difficult to add new ones. You can start with a highlighter for a language that is quite similar and adapt it, e.g. change the keywords. There is also SynGen that helps you create a highlighter from scratch. You can request a highlighter and someone may have or contribute a new one. Regarding Powershell have a look at this discussion. It contains an extended General highlighter that can be adapted to practically any language. PSPad uses that unit to support syntax highlighting for 180 programming languages.
-
I have no idea what you are trying to accomplish, but for instance you can put the PythonModule in a data module. Instead of using AddDelphiMethod directly. you could add an Event to the PythonModules Event's collection. Events are converted to python functions, which delegate the execution to a Delphi event handler. Then, every time the form is created, it could assign a handler to the event's OnExecute property.
-
You should not free modules that have been initialized and loaded into python while the python engine is active. python has references to procedures of the module and this may lead to crashing python. You can destroy modules after python has finailized.