I'm having problems importing modules containing Boost.Python produced bindings into an embedded Python interpreter. The following compiles into a module that loads fine into a standalone Python: testing.hh: ------------------ class A { }; ------------------ testing.cpp ------------------ #include <boost/python.hpp> #include "testing.hh" using namespace boost::python; BOOST_PYTHON_MODULE(testing) { class_<A>("A", init<>()) ; } ------------------- However, I get problems when I try to import the module into an embedded Python interpreter as follows: Py_Initialize(); PyRun_SimpleString("print 'Running Python'\n" "import testing\n" "print 'imported testing'\n" "a = testing.A() \n" "print 'a=', a \n"); The program outputs: Running Python imported testing Traceback (most recent call last): File "<string>", line 4, in ? AttributeError: 'module' object has no attribute 'A' I've googled around and found several pages describing similar problems, but so far no solutions. My setup is OS X 10.4, Python 2.4.4 and GCC 4.1.1 if that is of any help. -- Pertti