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

Adrian Maier adrian.maier at gmail.com
Tue Nov 14 09:57:21 CET 2006

On 11/14/06, Tiziano_mk <tizzziano at tiscali.it> wrote:
> 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).

I'm on Linux .   Thanks anyway !

> 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...

It's good to know about this.  But this is a solution for the opposite problem:
calling pascal code from python.

Adrian Maier

More information about the fpc-pascal mailing list