[fpc-pascal] Executing python code from a pascal program

Tiziano_mk tizzziano at tiscali.it
Tue Nov 14 09:45:47 CET 2006


Adrian Maier ha scritto:
> Hello,
> 
> I am trying to write a program that is embedding the python interpreter
> in order to execute python code.  I don't need to transfer values between
> pascal and python.
> 
you welcome!

If you are using Lazarus on Windows, I can send you the core units of 
Python for Delphi adapted in order to be compiled with Lazarus (not yet 
usable under Free Pascal only).

references: http://membres.lycos.fr/marat/delphi/python.htm

If you need using pure Free Pascal (RTL+FCL), or are on Linux or MacOS, 
this has to be done in other ways, but the P4D library is the model to 
follow.

There is another idea to explore:
With Python 2.5 there is a module named "ctypes" that allows calling DLL 
functions from Python. And we know how to build a DLL with FPC, true?.

I (on windows) and my friend (on Linux) are actually working in order to 
make some experiment and documentation about this matter. If you could 
partecipate and help...

bye
tiziano



More information about the fpc-pascal mailing list