Member-only story
Integrating Python in Delphi: A Guide to Boosting Development Efficiency

The purpose of this article is to create a Delphi FMX application that runs a Python application in a thread without locking the UI. We need to have Embarcadero’s Delphi installed (I am using version 12.2 for this build), and having Python4Delphi (you can obtain it through the GetIt Package Manager on the Delphi UI). What we will learn is to load a python script, run it, have the ability to stop the script, print to the UI, update a Label on the UI, and maintain a thread for the python code being executed.
TL;DR The full source code can be found in my github repository:
The full release with a compiled binary for Windows 64-bits can be found here, do note that you need to have Python 3 installed: