-
Content Count
946 -
Joined
-
Last visited
-
Days Won
58
pyscripter last won the day on February 7
pyscripter had the most liked content!
Community Reputation
714 ExcellentAbout pyscripter
Technical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
A new powerful highlighter called Omni (for omnipotent) has been added to SynEdit. Importantly, this highlighter allows the saving/loading of highlighter settings to/from ini files. The project now includes 189 new ini-based highlighters in addition to the 75 ones that were already included. Sample using the PowerShell ini-based highlighter. Notice that code-folding is automatically supported. Structure highlighting is also supported: A component editor has also been added that can be used at both design and run-time. See this discussion for details. This is based on a significant code contribution by Jan Fiala, the author of PSPad. Kudos to Jan!
-
Talking about capitalization, the Delphi Style Guide: is quite clear about: using "Pascal casing" (e.g. MyData) across the board (variables, parameters etc..) fields starting with a capital F. avoiding prefixes such as lData for local variables or aFileName for parameters. The Delphi RTL mostly complies with the above recommendations, but much of the Delphi code around does not. There is also a lot of variation regarding the use of prefixes in control names inside Forms. Spring4D in particular uses camelCasing for parameters and local variables, small f for fields and uses Pascal casing for function/procedure names and properties. @Stefan Glienke Is this just a matter of taste? I can see some advantages in the following convention (a hybrid of the DSG and the spring4d conventions): Properties/function/procedure names use Pascal casing - Inside the class use the field name instead of the corresponding property name. Function/procedure parameters use camelCasing Fields start with F Local variables follow Pascal casing Global variables (just avoid using). In this way you could immediately tell if any variable is a parameter, a local variable or a field without littering the code with ugly prefixes and the like (except for the now established F for fields). And if you follow the rule about properties and avoid with statements, then you would almost always refer to properties using the dot notation. I am not actually using this currently, trying to stick to the Delphi Style Guide. Any thoughts? What is you preferred convention and why? @Joshua Gardner Does the "opinionated" pasfmt take a view on capitalization?
-
As well as python's black.
-
And incidentally, for whoever has not tried it, Delphilint from the same group, really rocks.
-
Looking for containskey when processing data
pyscripter replied to JIMSMITH's topic in Network, Cloud and Web
There is also TryGetValue<T>. -
The IDE docking is based on TDockTabSet, which was introduced in Delphi 2005. It has received some attention later including Vcl styling. The only demo I could find is an old one by Jeremy North, but the source code is not available. Jeremy also seemed to have expanded this component in his QualityCentral client (look at the images at the end of the article), the source code of which is also not available. It is not the sleekest implementation, but apparently it works OK in the IDE. Agree in general, but it depends on the application. All the IDEs I know of, including Visual Studio, use docking extensively. Same is true for VS Code for example (but no floating forms though). In PyScripter I use a heavily modified version of JvDocking (part of the JVCL library), but I am still looking for a better open source library. I may have to create one.
-
A new version 1.2.0 of ChatLLM has been released: New Features: Much improved rendering of responses on a par with the Web Chat interfaces of the LLM providers. Syntax highlighting of code (300 languages are now supported thanks to Prism). Support for DeepSeek models Support for reasoning models such as OpenAI's o1-mini and DeeepSeek's deepseek-reasoner. Exposed the temperature LLM parameter. Screenshots: Settings: User interface: Reasoning with deepseek-reasoner: And by the way DeepSeek is so much better than Gemini on Delphi coding.
-
How do I "Import" Libraries using Python4Delphi?
pyscripter replied to JohnLM's topic in Python4Delphi
Looks like an installation problem. Solving the AttributeError: Module 'numpy' has no attribute '__version__' | Saturn Cloud Blog I would start afresh: Uninstall existing python Grab the most recent python from www.python.org Use pip to install any modules you need Then test Open the python CLI >>> import numpy etc. And finally find a good python tutorial to get started, using of course PyScripter. -
No idea. If you start a new project, import System.Threading, and use TParallel does it compile?
-
In case anyone has a use for it, here is how you can set the browser color scheme: procedure TForm2.SetColorScheme(Dark: Boolean); var Profile: ICoreWebView2Profile; Scheme: COREWEBVIEW2_PREFERRED_COLOR_SCHEME; begin if Dark then Scheme := COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK else Scheme := COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT; (EdgeBrowser.DefaultInterface as ICoreWebView2_13).Get_Profile(Profile); Profile.Set_PreferredColorScheme(Scheme); end; function IsStyleDark: Boolean; var LStyle: TCustomStyleServices; LColor: TColor; begin Result := False; LStyle := TStyleManager.ActiveStyle; if Assigned(LStyle) then begin LColor := LStyle.GetSystemColor(clWindow); // Check if the background color is dark Result := (LColor and $FFFFFF) < $808080; end; end; Form2.SetColorScheme(IsStyleDark); Form2.EdgeBrowser.NavigateToString(Html);
-
How do I "Import" Libraries using Python4Delphi?
pyscripter replied to JohnLM's topic in Python4Delphi
Just go to www.python.org, download the most recent version and install it. It includes pip. -
For years there have been rants about flicker in Vcl applications. So when I tried to fast resize a form with an EdgeBrowser and saw the browser scrollbar jumping right and left, I assumed that it is Delphi's problem. Then I tried the same with Edge and the result was the same. Massive flicker when the scrollbar is visible! Bravo Microsoft! In fact Edge flickers even without scrollbars, whilst Delphi's EdgeBrowser doesn't. By the way does anyone know how to Vcl style the EdgeBrowser scrollbar?
-
Use VitrualTreeView. See the demos.
-
@Erik@Grijjy's neslib/Chet: C Header Translator for Delphi may be worth giving it a try.
-
Out of curiosity, I tried the CrowdStrike analyzer on the PyScripter setup program (signed). Whilst Falcon and MetaDefender gave a clean record, their Falcon Sandbox report gave a threat score 100/100! The report included the following: This report has 268 indicators that were mapped to 106 attack techniques and 11 tactics - Calls an API typically used to query local/system time as file time - Reads configuration files (.ini files) - Marks file for deletion - Contains ability to load/free library (API string) - Contains ability to modify registry key/value (API string) - Contains ability to set file time (API string) etc. Micorsoft's "MicrosoftEdgeWebview2Setup.exe" fails miserably as well. I am not sure any real-world compiled program would pass all these tests. I don't think there is much to worry about here.