Albion 0 Posted March 12, 2022 (edited) Good day everyone! I have a question. Perhaps someone has already experienced this. I have a ready-made program on Delphi. And I need to initialize and execute all the functions of this program using a Python script. Is it possible to accomplish this task only with the help of TPytnon components? Without adding memos and other things as shown in the demo programs. Just run the script and get the result. Maybe someone can help with this question. I would be very grateful for any help. Thanks for attention. Edited March 12, 2022 by Albion Share this post Link to post
Dave Novo 51 Posted March 27, 2022 There is no way for Python to know about the objects/functions in your delphi program. You have to create some classes and register them with the Delphi4Python to expose them to the python side. These can be your real classes in your application (not advised IMHO), or "bridge" classes that just expose functions to python. Then, in your implementation of the bridge methods, you call methods/functions on the delphi side. 1 Share this post Link to post
Albion 0 Posted April 5, 2022 On 27.03.2022 at 22:31, Dave Novo said: У Python нет возможности узнать об объектах/функциях в вашей программе Delphi. Вам нужно создать несколько классов и зарегистрировать их в Delphi4Python, чтобы предоставить их стороне Python. Это могут быть ваши настоящие классы в вашем приложении (не рекомендуется ИМХО) или классы-«мосты», которые просто предоставляют функции для python. Затем в вашей реализации методов моста вы вызываете методы/функции на стороне delphi. Hello, thanks for your help. I also wanted to clarify whether it is possible to initialize Delphi procedures. For example, I have a Button1.click procedure, is it possible to initialize and run it using a Python script? Share this post Link to post