Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Quickly Learn To Assign Value Between Delphi And Python Using Python4Delphi Sample App

Earlier in the Python4Delphi Demo 3 post, we have learned how to create a Python Delphi Variable using the TPythonDelphiVar component, assign some value to it, and showed the value as a string. You can also use Python4Delphi with C++Builder. This post will see some advanced usage of the TPythonDelphiVar component. You can also use Python4Delphi with C++Builder.

Python4Delphi Demo4 Sample App shows how to assign a variable value between Delphi and Python using the TPythonDelphiVar component events. This can be achieved by events that set and gets data as a variant or python object. Internally this component converts a value from Delphi to python and vice versa. You can find the Demo4 source on GitHub.

Prerequisites: Download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out this video Getting started with Python4Delphi.

Components used in Python4Delphi Demo4 Sample App:

You can find the Python4Delphi Demo4 sample project from the extracted repository ..\Python4Delphi\Demos\Demo04.dproj. Open this project in RAD Studio 10.4.1 and run the application.

Implementation Details:

[crayon-6743197c11731690531867/]

[crayon-6743197c1173d087646262/]
<strong>Python4Delphi Demo4<strong>

Check some of the tutorials available for Python4Delphi here

Exit mobile version