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

Leonardo M. Ram� martinrame at yahoo.com
Mon Nov 13 16:24:50 CET 2006


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:Pchar):longint; cdecl; external 'python24.dll'; 

implementation

end.



Leonardo M. Ramé
http://leonardorame.blogspot.com


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com



More information about the fpc-pascal mailing list