-
Content Count
785 -
Joined
-
Last visited
-
Days Won
42
Posts posted by pyscripter
-
-
1 hour ago, vmishka said:I did not add them to Windows 32-bit
The design time packages are 32-bit so you need to add the paths to the 32-bit target.
The group project contains runtime and designtime packages.
You first need to compile/build the runtime packages for target 32-bits. Optionally and only if you want to build 64-bit applications with runtime package, build 64-bit runtime packages:
- Python270.bpl
- PythonVcl270.bpl
- PythonFmx270.bpl
Then install the Design time packages (these are always 32-bits)
- dclPython270.bpl
- dclPythonVcl270.bpl
- dclPythonFmx270.bpl
-
4 hours ago, Steve Maughan said:I made the mistake of updating as soon as it was released. After installing (all default option) I found it had scrubbed my Win64 component path. The Win32 path is in tact but it'll be a right old pain to manually copy between the two. Also had to re-install OnGuard and Konopka components via GetIt (a modest pain).
I was bitten by this a few times in previous upgrades. This time I knew better...
-
I think a (the) highlight of this release is fixing [RSP-27375] Compiler generates disadvantageous code for try/finally - Embarcadero Technologies. Thanks to @Mahdi Safsafifor coming up with a great suggestion and @Stefan Glienkefor creating the issue and pushing hard for its resolution.
- 5
-
SVGIconImageList/Demo at master · EtheaDev/SVGIconImageList (github.com) is not a bad starting point for debugging. The treeview has no interaction with the rest of the program.
-
5 minutes ago, balabuev said:I was not able to reproduce the issue.
In the SvgIconImageList demo case, the application was compiled with the Windows default style and the error occurs when you change the style at runtime. I think that may be significant because it causes the controls to be recreated.
-
Did you see my answer in Demo34 + NumPy · Issue #287 · pyscripter/python4delphi (github.com)?
Did you try what I suggested there?
-
The bug is not related to frames.
-
SVGIconImageList/Demo at master · EtheaDev/SVGIconImageList (github.com) suffers from the same problem.
-
P4D supports named parameters as follows:
requests.get('http://192.168.1.200/gci-bin/users', auth:=requests.HTTPDigestAuth('admin','admin')
Please note the := notation.
-
Sometimes it helps to trap the SystemExit exception. This would avoid many abnormal application exits.
try: """ Add your Python code here""" except SystemExit as e:
- 1
-
There are many ways to achieve what you want:
1. The ExecString has an overloaded form:
procedure TPythonEngine.ExecString(const command : AnsiString; locals, globals : PPyObject );
You can pass a new empty dictionary to the locals and globals argument if you do not want to "pollute" the interpreter namespace.
2. You can manually do the clean up as you suggest above.
3. A more advanced way is to use subinterpreters (have a look at TPythonThread.Execute), but this is more error prone.
- 1
-
Actually this is now fixed. Please try with the latest version.
-
I can confirm the issue. Could you please open an issue at Issues · pyscripter/python4delphi (github.com) so that we can track the progress in resolving this?
-
1 minute ago, limelect said:Looking for already compiled
Download the binary release.
-
35 minutes ago, limelect said:P.S for 64b i need miniblink_x64.dll could not find
-
Off Topic: VTune also appears to be a free download (Fix Performance Bottlenecks with Intel® VTune™ Profiler). Any experience of using it with Delphi?
-
Looks free to me.
Free Intel® Software Development Tools
End User License Agreements (intel.com)
The license if fairly liberal.
-
-
3 hours ago, matrix1233 said:1 - Installed Python4lazarus (with working demo1)
2 - using Demo1 with library of lazarus and changing the file PythonEngine.pas (lazarus) with the PythonEngine.pas (python4Delphi) and i have the same error ( Error: could not map symbol "Py_DebugFlag" ) so the problem is on this file .
Could you debug MapDLL in both and try to see whether they differ? I have looked at the code and could not see any significant difference.
-
11 minutes ago, matrix1233 said:The strange think is if i install python4lazarus( https://github.com/Alexey-T/Python-for-Lazarus/) it's work
But the two are almost identical nowadays and they both import Py_DebugFlag etc. Could you please pinpoint what makes the differences (e.g. by stepping through the code)? That would be very useful.
If you do have access to Delphi for the MacOS can you please also try with that?
-
Ok. There must be something wrong with the dynamic library you are using. P4D has been used without such issues in MacOS.
Could you please try to install a different version of python say 3.7 or 3.9 and test with that?
Can any other MacOS user shed some light here?
-
Android is not supported yet.
-
In that case what happens of you comment out the importing of all flags?
-
Strange. Py_DebugFlag should be exported on all platforms. Please uncomment the line with the Import - Import(Py_DebugFlag). Does it work then?
exit terminates delphi app
in Python4Delphi
Posted
exit() raises the SystemExit exception, which unlike other exceptions, results in process termination before control gets back to Delphi. To prevent process termination you can do one of the following: