C++CodeDelphi

Learn About Using Threads Inside Python For A Windows Delphi App In This Sample

We know Delphi supports Multithreading. Multithreading in Python can be achieved using Python Module Threading. However, In a use case like Delphi Application embedding Python(Python4Delphi) or CPython, the interpreter is not fully thread-safe. In order to support multi-threaded Python programs, there’s a global lock, called theglobal interpreter lockorGIL, that must be held by…
Read more
CodeDelphi

Learn A Faster Way To Make A Python Module As A DLL Using Python4Delphi Sample App

Sometimes we may need to share the functionalities as DLL and we know, creating a DLL in Delphi is a simple task. We learned how to create Python Module and add methods to it in Delphi. How about making a python module as DLL using Python4Delphi and import this python module in another application? This post will guide you to do that. You can also use Python4Delphi with…
Read more
CodeDelphi

Learn About Using Delphi Methods As Python Functions With Python4Delphi Sample App

Earlier we have seen how to add methods in Python Module using Python4Delphi TPythonModule component’s Add Method. However, the Add Method parameter uses a PyCFunction type parameter. In many cases, we may need to define the method which should return Delphi Type. How to do that? This post will provide a way to do that using the TPythonModule component itself. You can also use Python4Delphi…
Read more
CodeDelphiRAD Studio

Easily Create Python Delphi Variables In Delphi Using Python4Delphi Sample App

As we know, a Variable stores a value so that you can reuse it later in your program. This reduces redundancy, improves performance, and makes your code more readable. What is Python Delphi Variable? This post will guide you to understand. You can also use Python4Delphi with C++Builder. Python4DelphiDemo3Sample App shows how to create a Python Delphi Variable in Delphi using the…
Read more