I don't understand how to get my compiled module into the Python interpreter. I compiled this code to a shared object target with g++ on Ubuntu 8.10 to a path in sys.path
#include <boost/python.hpp>
using namespace boost::python;
char const* greet()
{
return "hello, world";
}
BOOST_PYTHON_MODULE(hello_ext)
{
def("greet", greet);
}
Then, I opened IDLE and tried "import hello_ext" (hello_ext not found) and tried using File -> Open Module... -> foo.so, but that produced an error.
What do I do to get the module into Python?
Thanks.