Go to QuArK Web Site
Converting between Delphi and Python
Updated 22 Dec 2019
Upper levels:
QuArK Information Base
4. The Source Code
4.4. Specific Topics

 4.4.11. Converting between Delphi and Python

 [ Prev - Up - Next ] 

The Delphi class  QObject  contains the Python object as well; see its public member  PythonObj . In a sense, the Python object is embedded into the Delphi object.

This also allows the Delphi code to easily find the Delphi object belonging to a Python object (assuming it was made through the Delphi-code); see  QkObjFromPyObj1  in the Python\PyObjects.pas file.

 Py_BuildValueX  does not handle float arguments ('f') properly; make them into Python Floats through  PyFloat_FromDouble , and send them through as objects. The same goes for double arguments ('d'); see their dedicated functions.


Copyright (c) 2022, GNU General Public License by The QuArK (Quake Army Knife) Community - https://quark.sourceforge.io/

 [ Prev - Top - Next ]