Andrew Gregory wrote:
Python library functions (prototypes in Python.h, binary library libpython24.a) such as PyComplex_AsCComplex for example must be called for type checking and for conversions to C types at run time. Correct me if I'm wrong, but as far as I know you cannot do that directly from Pascal without quite a lot of work to get Python.h and the many include files within into a Pascal-compatible form. Therefore you have to use C or C++.
If those library routines already exist and are written in C, then sure. And often it may make sense to write small C wrappers indeed -- e.g., I don't know what "CComplex" is -- C has no built-in complex type AFAIK, unlike Pascal, so it may be a user-defined type, and a conversion wrapper may be reasonable. For other types (e.g. `int' -> `CInteger') direct Pascal access to the library routines may be reasonable. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8