...
I've developed a simple interface package, taking advantage of the fact that all applications build built with our tools can link and run against the Python interpreter, to allow a seamles invokation seamless invocation of Python code from C++. Jim Chiang has provided invaluable help and suggested extensions.
My My purpose was to make it easy to specify configuration data for applications, avoiding wiring in constants, or writing elaborate parsing difficult to justify for small, or one-off applications. But the capability extends far beyond that.
The very small interface packages is "embed_python". It is currently in ScienceTools LATEST, and will migrate to the release soon. Non-ScienceTool users can check it out and build it.
Here is the outline of a very simple complete package that runs a test program, named "test_python", in only three files. The requirements file:
Code Block |
---|
package test_python use embed_python * application runit main.cxx |
...
It is now in use by the IRF code. 2006-12-11 19:58:33.0 0
Additional features that are supported, and easy to use, are loading lists and calling functions.