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

2006-11-14 Thread Tiziano_mk
Adrian Maier ha scritto: On 11/14/06, Tiziano_mk <[EMAIL PROTECTED]> wrote: Adrian Maier ha scritto: 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 abo

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

2006-11-14 Thread Adrian Maier
On 11/14/06, Tiziano_mk <[EMAIL PROTECTED]> 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 Lazaru

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

2006-11-14 Thread Tiziano_mk
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 D

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

2006-11-13 Thread Adrian Maier
On 11/13/06, Leonardo M. Ramé <[EMAIL PROTECTED]> wrote: I created a Python.pas unit this way using Delphi and it works correctly (note the cdecl directive before external): unit python; interface procedure Py_Initialize; cdecl; external 'python24.dll'; procedure Py_Finalize; cdecl; extern

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

2006-11-13 Thread Leonardo M. Ram
I created a Python.pas unit this way using Delphi and it works correctly (note the cdecl directive before external): unit python; interface procedure Py_Initialize; cdecl; external 'python24.dll'; procedure Py_Finalize; cdecl; external 'python24.dll'; function PyRun_SimpleString(_para1:Pch

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

2006-11-13 Thread Leonardo M. Ram
Try addign cdecl or stdcall at the end procedure Py_Initialize;external name 'Py_Initialize'; cdecl; // or stdcall; procedure Py_Finalize;external name 'Py_Finalize'; cdecl; // or stdcall; --- Adrian Maier <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to write a program that is embedding

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

2006-11-13 Thread Adrian Maier
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. More specifically, I'm trying to convert to pascal the following: #include int main(int argc, char *argv[]) { Py_Initiali