Skip to content
Salvador Díaz Fau edited this page Nov 3, 2026 · 7 revisions

Python4Pascal is an open source project used to embed Python in applications made with Delphi or Lazarus/FPC.

Python4Pascal is based in the Python4Delphi project made by Kiriakos Vlahos PyScripter. The original license of that project still applies to Python4Pascal. Read the license terms in the LICENSE file.

Python4Pascal uses Python 3.15, 3.14, 3.13, 3.12, 3.11, 3.10 and 3.9, and it supports Windows, Linux, macOS and Android.

Python4Pascal was developed and tested on Delphi 13.2, Delphi XE2, Delphi 7 and Lazarus 4.8/FPC 3.2.2.

The demos have been tested in Windows 10, Windows 11, Linux Mint 22.3 and Raspberry Pi OS.

Main features

  • Supports the latest version of Python.
  • Handles the Python objects lifetime automatically.
  • Fully documented in XML code comments, CHM and HTML files.
  • Imports more than 1200 Python library functions and types.
  • Includes many classes to handle all Python objects with Delphi/Lazarus types as arguments whenever it's possible.
  • Demos for Windows, Linux, macOS and Android.
  • It's possible to create Python modules and extension modules.
  • Handles Python objects with variant types or using Delphi/Lazarus wrappers.

Clone this wiki locally