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

Flexible Way To Set And Get Variant Array Between Delphi and Python For Building Windows Apps

Do you need to exchange a variant array between Delphi and Python Quickly? Python4Delphi offers the TPythonModule component which has a method and procedure to exchange a variant array. This post guides you to do that. You can also use Python4Delphi with C++Builder.

Python4Delphi Demo17  App shows how to assign and get a variant array value using the TPythonModule component. You can find the Demo17  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 Demo16 App:

Implementation Details:

[crayon-67435de8ba97a831407589/]
<strong>Python4Delphi Demo17<strong>

Its that simple passing Delphi variant array to python and get the value back from python.

Head over and find out more about combining Python and Delphi for building high performance Windows apps!

Exit mobile version