Re: [C++-sig] Boost.Python Problem

2010-05-26 Thread alexandre monti
Hello ! I would extend embedded python, so the code is in the main : int main(int argc, char* argv[]) { Py_Initialize(); object main_module((handle<>(borrowed(PyImport_AddModule("__main__"); object main_namespace = main_module.attr("__dict__"); } I've read that the error is speci

Re: [C++-sig] Boost.Python Problem

2010-05-25 Thread Jim Bosch
On 05/18/2010 12:44 PM, alexandre monti wrote: object main_module((handle<>(borrowed(PyImport_AddModule("__main__"); object main_namespace = main_module.attr("__dict__"); What's the context? At least on my Ubuntu system, the following code: #include using namespace boost::python; BOOST