Delphi's FireMonkey framework as a Python module for Windows, MacOS, Linux, and Android GUI development.

Overview

DelphiFMX4Python

Delphi's FireMonkey framework as a Python module for Windows, MacOS, Linux, and Android GUI development.

About:

The delphifmx library is provided by the Python4Delphi library as a standard Python module.

Python installation requirements on Linux:

It uses the Python interpreter, requiring Python to be compiled with the "--enable-shared" flag.
Make sure you've set the "LD_LIBRARY_PATH" and "PATH" environment variables and that Python loads the same libpython.so used by delphifmx.

  • Check out the scripts directory for further instructions in how to install Python or for an automated installation process.

Installation:

pip install delphifmx

Supports:

  • Win32 x86, Win64 x86, Linux64 x86, Android64, and macOS64 architecturtes
  • Python cp36, cp37, cp38, cp39

Also check out DelphiVCL4Python.

Powered by Embarcadero Delphi and the Python4Delphi library.

Comments
  • Can not run Simplest.py in my Macbook 2020 (Core i7)

    Can not run Simplest.py in my Macbook 2020 (Core i7)

    Hi ,

    i have installed the delphifmx as shown, image

    and tried to run the sample as shown, image

    but ran into some could not open DLL "libpython3.7.dylib" issues, any advice please ? thanks.

    unsupported 
    opened by kalmenchia 17
  • SystemError: <built-in method LoadProps of Parent_Form object at 0x0000021BF049DE50> returned NULL without setting an error

    SystemError: returned NULL without setting an error

    self.LoadProps(os.path.join(os.path.dirname(os.path.abspath(__file__)), "parent_window.pyfmx"))
    

    SystemError: <built-in method LoadProps of Parent_Form object at 0x0000021BF049DE50> returned NULL without setting an error

    vironment SystemError: <built-in method LoadProps of Parent_Form object at 0x0000021BF049DE50> returned NULL without setting an error delphi 11 windows 11 pyscrit 4.1.1.0 x64

    opened by jamilygo 10
  • Doesn't work on Ubuntu 18.04

    Doesn't work on Ubuntu 18.04

    Just trying to get Simplest.py to run, with no luck. This is what I've tried:

    $ cd ~/tmp/delphifmx
    $ virtualenv -p /usr/bin/python3.8 delphienv
    Running virtualenv with interpreter /usr/bin/python3.8
    Using base prefix '/usr'
    /usr/lib/python3/dist-packages/virtualenv.py:1086: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp
    New python executable in /home/rsg/tmp/delphifmx/delphienv/bin/python3.8
    Also creating executable in /home/rsg/tmp/delphifmx/delphienv/bin/python
    Installing setuptools, pkg_resources, pip, wheel...done.
    
    $ source delphienv/bin/activate
    (delphienv) $ python --version
    Python 3.8.6
    
    (delphienv) $ pip install delphifmx
    Collecting delphifmx
      Downloading delphifmx-0.1.48-cp38-cp38-manylinux1_x86_64.whl (10.1 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 1.2 MB/s eta 0:00:00
    Installing collected packages: delphifmx
    Successfully installed delphifmx-0.1.48
    
    (delphienv) $ python Simplest.py 
    Segmentation fault (core dumped)```
    
    Not very interesting. I decided to try and see what was failing by going in to Python and trying the script manually; this is what I get:
    
    ```(delphienv) $ python
    Python 3.8.6 (default, Oct  6 2020, 03:22:36) 
    [GCC 7.5.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from delphifmx import *
    Segmentation fault (core dumped)```
    
    Again, not very interesting. At this point, there really is nothing I can think to try, as it can't even import the darn thing. Any ideas?
    unsupported 
    opened by rsgrimes 6
  • not working on synology

    not working on synology

    Hello When I want to execute the example controlsdemo.py on my synology NAS, I have an error in the import :

    Traceback (most recent call last): File "/volume1/py3/controlsdemo.py", line 12, in from delphifmx import * File "/volume1/py3/delphifmx/init.py", line 82, in package = new_import() File "/volume1/py3/delphifmx/init.py", line 68, in new_import modulefullpath = findmodule() File "/volume1/py3/delphifmx/init.py", line 65, in findmodule raise ValueError("Unsupported platform.") ValueError: Unsupported platform.

    Python3.10 it well detected. It seems it is because the ossys is true detected as Linux but the libdir is None ??? Is there anything to do ?

    Sorry for my bad english ... I'm french man Thanks

    Awaiting Feedback unsupported 
    opened by navy-git 6
  • Is it working for Ubuntu?

    Is it working for Ubuntu?

    DelphiFMX works great on Windows, but not on Ubuntu. I tried Python 3.8, 3.9 and 3.10 on two different Ubuntu 20.04 machines, the "import delphifmx" simply shows "Segmentation Fault". Did I miss anything?

    image

    opened by zwm88 5
  • OnKeyUp Error: No Registered EventHandler for events of type

    OnKeyUp Error: No Registered EventHandler for events of type "TKeyEvent

    Test_Exporter_py_

    Delphi_

    I made just a simple project in Delphi fmx and used the Exporter to Python. Delphi works perfect. When running without modification the Unit.py it get this Error. The same configuration in vcl runs perfect. Unit1.py.txt

    Awaiting Feedback 
    opened by knietsch 4
  • source code of DelphiFMX.pyd

    source code of DelphiFMX.pyd

    Delphi has always been released with source code, which is great. Once my project has problems, I can check the source code to determine how to solve them. However, I haven't found the source code of DelphiFMX.pyd, so any small problems in it will stop my project. Can release the source code of DelphiFMX.pyd?

    opened by hanlaohan 3
  • Documentation and link to PythonFMXBuilder

    Documentation and link to PythonFMXBuilder

    Documentation showing how to use the PythonFMXBuilder to target Android

    Issue link of the host repository: https://github.com/Embarcadero/PythonFMXBuilder/issues/5

    documentation 
    opened by jimmckeeth 1
  • Create minimal documentation using Sphinx

    Create minimal documentation using Sphinx

    Work on multiple pages for documentation like: installation, Tutorials and Guides, Examples, Contributing, Changelog, Reference API, etc., for GUI Python packages

    documentation 
    opened by Priyatham10 0
  • How to make threads work

    How to make threads work

    I'm in trouble again. It seems that D4P cannot work with Python threads. The threads I create in Python will be blocked by Delphi UI. Is there any way to solve this problem

    Awaiting Feedback 
    opened by hanlaohan 1
  • Legal question

    Legal question

    Dear Embarcadero, Similiar to DelphiFMX4Python I build an API to make use of Delphi FMX from the D Programming Language

    https://github.com/andre2007/delta-core-10-2-1 https://github.com/andre2007/delta-fmx-10-2-1

    Sample

    import delta.core;
    import System.Classes, System.UITypes, System.Types, FMX.Forms, FMX.Memo, FMX.Types;
    
    void main()
    {
        deltaLibrary.load(`.\views\Win32\Debug\Project1.dll`);
        
        Application.Initialize;
        Application.MainForm = TCustomForm.CreateNew(Application);
        Application.MainForm.Caption = "Sample";
        
        auto memo = TMemo.Create(Application.MainForm);
        memo.Lines.Add("Hello World!");
        memo.Align = TAlignLayout.Client;
        memo.Parent = Application.MainForm;
    
        Application.MainForm.Show();
        Application.Run();
    }
    

    No binary artifact (Dll containing FMX code) is distributed on the Github repository but an user of the repository needs to compile itself a DLL using an official Delphi IDE.

    Dll sample source

    library Project1;
    
    {$STRONGLINKTYPES ON}
    
    uses
      System.SysUtils,
      System.Classes,
      System.Types,
      System.UiTypes,
      FMX.Forms,
      FMX.Types,
      FMX.Memo,
      FMX.Graphics,
      Delta.Methods,
      Delta.Properties,
      Delta.System.Classes,
      Delta.FMX.Forms,
      Delta.FMX.Objects,
      Delta.FMX.Controls;
    
    {$R *.res}
    
    begin
    end.
    

    But the repository contains D wrapper classes for Delphi classes like https://github.com/andre2007/delta-core-10-2-1/blob/master/source/System/Classes.d https://github.com/andre2007/delta-fmx-10-2-1/blob/master/source/FMX/Graphics.d

    module FMX.ActnList;
    
    import delta.core;
    import System.Actions;
    import System.Classes: TComponent;
    
    class TCustomActionList: TContainedActionList
    {
     mixin!DelphiClass("FMX.ActnList.TCustomActionList");
    }
    
    class TActionList: TCustomActionList
    {
    	mixin!DelphiClass("FMX.ActnList.TActionList")
    	
    	static TActionList Create(TComponent owner);
    }
    

    The mixin template generates the method bodies automatically based on the signatures.

    Do you see any legal issue with providing this API and especially providing D wrapper classes for Delphi System/FMX classes on the Github repository?

    Also the question when I want to ship an application, I have to distribute the compiled Delphi DLL as part of my application (like https://github.com/andre2007/delta-fmx-10-2-1/blob/master/examples/gui_custom_form/views/Project1.dpr). Do you see any legal issue here?

    Kind regards Andre

    pending 
    opened by andre2007 20
  • Linux issues

    Linux issues

    Ubuntu 20.04 Python 3.8

    from delphifmx import *

    Causes: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

    Python app created with Delphi runs properly so dependencies should be installed.

    Awaiting Feedback 
    opened by cosina 10
  • M1 Issues

    M1 Issues

    MacOS version: 12.4 / Chip: Apple M1 Pro Python ARM compilation

    DelphiFMX runs smoothly on Python 3.8. Hower it hungs on Python 3.10 just upon importing: "from delphifmx import*"

    bug 
    opened by cosina 20
Owner
Embarcadero Technologies
Leading the Way with Innovative, Heterogeneous Software Tools
Embarcadero Technologies
A simple Python Module for sending cross-platform desktop notifications on Windows, macOS and Linux

notify.py Cross platform desktop notifications for Python scripts and applications. Docs You can read the docs on this Git's Wiki, or here Supported P

Mustafa 178 Dec 26, 2022
A small pomodoro GUI for Windows/Linux created in Python with PyQt5.

Pomodoro A small pomodoro GUI for Windows/Linux created with PyQt5. Features The "Timer" tab allows you to set your desired work and rest times aswell

Burak Martin 81 Dec 28, 2022
A Minimalistic Backup GUI for your Windows, Mac or Linux

BlobBackup is a minimalistic backup utility for your Windows, Mac or Linux computer. With an excellent engine, extensive storage support, and an easy

Bimba Shrestha 283 Nov 30, 2022
A Minimalistic Backup GUI for your Windows, Mac or Linux

BlobBackup is a minimalistic backup utility for your Windows, Mac or Linux computer. With an excellent engine, extensive storage support, and an easy

null 283 Nov 30, 2022
Windows & Linux GUI application to use a Satodime (satodime.io)

Satodime-Tool Licence: LGPL v3 Author: Toporin Language: Python (>= 3.6) Homepage: https://github.com/Toporin/Satodime-Tool Introduction What is Satod

null 4 Dec 16, 2022
Desktop application for Windows/macOS users to rotate through custom, preset, and searched-for collections of backgrounds with scheduling and additional settings

Background Revolution (In Development, Alpha Release) What? This will be an application for users to customize their windows backgrounds by uploading

Daniel Agapov 1 Nov 2, 2021
A cute running cat animation on your Windows/macOS taskbar.

RunCat by PySide6 A cute running cat animation on your Windows/macOS taskbar. Tags PyQt PySide RunCat Demo You only have to run the RunCat.exe. Run pi

見える 10 Sep 19, 2022
GUI app to read settings and stats from Cloudflare WARP CLI for Linux, and change some settings

warp-cli-gui GUI app to read settings and stats from Cloudflare WARP CLI for Linux, and change some settings. Description Python program that will int

Danie 6 Nov 1, 2022
Create shortcuts on Windows to your Python, EXE, Batch files or any other file using a GUI made with PySimpleGUI

shor Windows Shortcut Creation Create Windows Shortcuts to your python programs and any other file easily using this application created using PySimpl

PySimpleGUI 7 Nov 16, 2021
A GUI for designing Python GUI's for PySimpleGUI.

SimpleGUIBuilder A GUI for designing Python GUI's for PySimpleGUI. Installation There is none :) just download the file from a release and run it. Don

Miguel Martins 65 Dec 22, 2022
PyQt5 Sample GUI Program - Python PyQt5 Sample GUI application

Python PyQt5 Sample GUI application Program work like this Designed GUI using De

Dimuth De Zoysa 5 Mar 27, 2022
Linux GUI app to codon optimize a directory with fasta files using taxonomy ids imported as a 1-column txt file (1 taxonomy id for each file)

codon optimize cds paired with taxids singlefastas gui Linux GUI app to codon optimize a directory with fasta files using taxonomy ids imported as a 1

Olga Tsiouri 1 Jan 9, 2022
The GUI application by Python3.8. Using QT Design draw UI and generator UI XML file provides to PySide2 build GUI components

The GUI application by Python3.8. Using QT Design draw UI and generator UI XML file provides to PySide2 build GUI components. Total adopt OOD design class, service, and abstract class. OOP implemented this project.

Jiage 1 Jan 11, 2022
Win32mica: a simple module to add the Mica effect on legacy python windows.

Win32mica (aka PyMica): A simple module to add the Mica effect on legacy python windows The aim of this project is to apply the Mica effect on python

Martí Climent 40 Dec 13, 2022
A GUI calculator made with tkinter module in python

GUI-Calculator A GUI calculator made with tkinter module in python How to setup the calculator If pygame is not installed, go to terminal and do pip i

Eric Jing 0 Aug 25, 2021
A simple GUI designer for the python tkinter module

Leer en Español Welcome to Pygubu! Pygubu is a RAD tool to enable quick and easy development of user interfaces for the Python's tkinter module. The u

Alejandro Autalán 1.7k Dec 27, 2022
A really minimalistic operating system made using python's GUI module Tkinter.

BoxOS V1.0.0 About A really minimalistic operating system made using python's GUI module Tkinter. What seperates it from the other operating systems m

Fahim 2 Dec 8, 2022
GUI to enable user selection of measurement and station in kHTConnector module.

kHTGui GUI to enable user selection of measurement and station in kHTConnector module. Helper tool for PowerBI users If you're planning to import data

kk 1 Jan 26, 2022