I have a C++ program that needs to make certain calls to a library which is written in Python. (As opposed to rewriting the entire library in C++...)
What's the simplest way to do this? I need to pass 2 numbers into the library, and get 2 numbers back.
I need it to be portable and run in both Windows and Linux, so for example using POSIX popen is not possible.
So far the best solution I have is to write a python wrapper, called by a "system" call in the C++ code, that takes command line parameters, calls the function, and writes the result to a file, which is then opened by the C++ program.
If you know anything better please let me know...