Python and Delphi are both powerful programming languages. Delphi, for instance, provides easy-to-use features compared to other languages which make it ideal for most windows application development. Not just it provides clear syntax, but it also offers an easy drag-and-drop system that enables users to build GUI software relatively much faster. Python, on the other hand, is another powerful and clear object-oriented programming language but it suffers when it comes to creating GUI Python apps. Whether you are a long-time Delphi user or a Pythonista, it doesn’t necessarily mean that you have to stick to one language as you can freely combine them both to build a more powerful coding environment.
How to get started with DelphiVCL for Python
There are powerful features and libraries in Python that are not present in Delphi and there are libraries in Delphi that are not featured in Python. We were recently introduced to the Python4Delphi library that provides a set of free components that wrap up the Python DLL into Delphi which makes it very easy to use python as a scripting language for Delphi applications. However, if you are a Pythonista who wants to embrace some of Delphi’s powerful components, there are powerful Python modules that allow you to build graphical user interfaces with Python using Delphi’s GUI libraries.
In this webinar hosted by Embarcadero MVP Jim McKeeth, we will learn more about these newly released free Python modules that bring the power and flexibility of Delphi’s mature GUI frameworks to Python. Delphi is known for its two powerful GUI frameworks including the VCL which focuses on native Windows development and FireMonkey which offers cross-platform GUI app development. These Python modules include DelphiVCL4Python and DelphiFMX4Python. Interestingly, these modules are based on the open-source Python4Delphi, the same technology that powers PyScripter.
How to use DelphiVCL4Python module in Python
This particular session will focus more on the DelphiVCL module. Generally, the primary focus of this Python module is to provide free Python modules/bindings of Delphi’s GUI libraries to Python developers. The idea is that it gives you the ability to take the powerful, mature GUI frameworks of Delphi’s VCL and use them in Python. DelphiVCL for Python is a native Python module. It is available via PyPi or you can simply download the source via GitHub. It is natively compiled for Win32 and Win64 and should work on Microsoft Windows 8 or newer.
Mckeeth also provides some basic samples including the “Hello DelphiVCL Python Script” that is included in Embarcadero’s DelphiVCL4Python GitHub repository. This sample can be opened and explored via PyScripter or any other Python editor. Another sample includes the Activity Indicator (also from the same GitHub repository) which allows you to load up and change Styles in Python. There’s also the Form Exporter that allows users to design their UI in Delphi IDE and export the form in Python. To learn more about these powerful Python modules, feel free to watch the webinar below.