Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
DelphiNewsPythonWebinar

Introduction to Python GUI Development with Delphi for Python (VCL & FMX)

delphipythonfeaturedimage

Learn how Embarcadero’s newly released free Python modules bring the power and flexibility of Delphi’s GUI frameworks to Python. VCL and FireMonkey (FMX) are mature GUI libraries. VCL is focused on native Windows development, while FireMonkey brings a powerful flexible GUI framework to Windows, Linux, macOS, and even Android. This webinar will introduce you to these new free Python modules and how you can use them to build graphical users interfaces with Python. Part 2 will show you how to target Android GUI applications with Python!

Slides download as PDF

Target Audience

  • Python devs who want a nice GUI
  • Python devs curious about Delphi
  • Delphi devs who want to use Python
  • Delphi devs curious about what’s new
  • Other devs curious about Delphi & Python

It’s not a Competition

● Developers have multiple tools on their workbench
● It is about finding the right tool for each task
● Having specialized tools for different tasks doesn’t detract from favorite tools
● You can always find a specific task that another tool is better for, but no one tool is that best for all tasks.

What is Delphi for Python?

● Set of free Python modules bringing Delphi’s GUI libraries to Python developers
● Based on the open source Python4Delphi (same technology that powers PyScripter)
● Available today on GitHub & PyPi
● Currently in beta, but ready for use
● DelphiVCL for Python supports Windows (32-bit & 64-bit)
● DelphiFMX for Python adds support for Linux 64-bit, Android, & Mac OS
● Part of a bidirectional bridge between Delphi and Python

Timeline for Delphi & Python

py3-7595426

Delphi’s DNA

  1. Developer productivity – Really the main goal is getting things done quickly
  2. Maintainability – Code is easy to read and understand with good encapsulation
  3. Fast compiled native apps – Compiles fast, and native applications run fast
  4. Database access – Always includes a rich set of database access components
  5. Platform API access – You don’t need to call platform APIs, but can if you want
  6. Property-Method-Event – General model for working with components
  7. Visual designers – WYSIWYG with drag and drop interface
  8. Reliable applications – Exception handling and component owner model
  9. Backwards compatibility – Even with all the updates most code is compatible
  10. 10.Rich component ecosystem – There is usually a component for everything

Zen of Python

19 “guiding principles” that influence the design of the Python programming language

py2-9629825

Comparison (Delphi – Python)

py1-8727397

Three Levels of Development (Universal to all development tools)

py4-9423189

VCL (Visual Component Library for Microsoft Windows)

● Designed for Windows and evolving with each new Windows release supporting latest features, controls, themes, and design
● Full source ships with each release since Delphi 1
● Mostly a light wrapper around the native platform widgets and controls
● Includes a lot of “owner drawn” controls too
● Provides easy access to Windows Handles, Messages, etc.
● Greatly simplifies Windows development maintaining access to all platform features and APIs
● Native Windows look and feel with full theme system
● Mature platform with rich ecosystem of 3rd party components

FMX (The Cross-Platform FireMonkey Framework)

● Takes advantage of GPU libraries to provide a hardware accelerated, rich user interface that is fast and looks great across multiple platforms
● Similar to VCL, but not designed to be compatible
● Integrated GPU effects, animations, and robust styling system
● Platform services abstract the access to platform hardware and functionality to intelligently adapt the UI & UX to platform specifics
● Very flexible component system – do more with fewer components (nestable)

Short Delphi Tour

  • Delphi isn’t required to use the Delphi for Python modules
  • The IDE runs on Windows, but targets other platforms
  • There are multiple editions and options to get started
  • Free options – 30-day trial of RAD Studio Enterprise / Community Edition (some limitations apply)
  • Three paid editions – Professional, Enterprise, and Architect
  • Note: RAD Studio includes Delphi and C++Builder
  • Find out more embarcadero.com/products/delphi

Delphi for Python

delphi4python-6281376

Delphi VCL for Python Installation

Hello World (The simplest example)

py5-2946619
py6-7066556

Example with Styles

Design Your UI in the Delphi IDE

Combine Delphi and Python

  • The Python4Delphi library is a bidirectional bridge
  • Develop parts of your solution in Delphi, and part in Python
  • Play to the strengths of each
  • Merge them together into a single cohesive solution
  • Find samples, tutorials, and videos

Use Delphi to Create Native Python Modules

● Many Python modules are written in C/C++ and natively compiled
● Delphi also creates natively compiled Python modules via Python4Delphi
● Prototype rapidly in Python, and then create optimized modules in Delphi to clear bottlenecks
● Much like Python, Delphi code is focused on readability and clear structure and may be easier for you than using C/C++
● Augment your use of PyPy or Cython

Documentation and Library References

About PyScripter

  • Popular free & open-source Python IDE sponsored by Embarcadero
  • All the features expected in a modern Python IDE while being lightweight and very fast
  • Natively compiled for Windows to use minimal memory with maximum performance
  • Full local and remote Python debugging
  • Integration with Python tools like PyLint, TabNanny, Profile, etc.
  • Run or debug files from memory.

About UltraEdit

  • High performance text editor for programmers.
  • Industry’s best large file handling: 10+ GB and beyond.
  • Syntax highlighting for nearly any language or data format.
  • Smart templates.
  • Hex editing. Column / block mode editing.
  • Part of Idera family of developer tools.

Next Steps

Find Delphi VCL for Python on GitHub


Python GUI Development

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Chief Developer Advocate for Embarcadero Technologies.

2 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES