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

[C++-sig] Boost.Python Problem

2010-05-18 Thread alexandre monti
Hello ! I've just installed Boost.Python on my iMac intel, but i've a bug. This is the code : object main_module((handle<>(borrowed(PyImport_AddModule("__main__"); object main_namespace = main_module.attr("__dict__"); As you can see it is very, very, very minimal and simple, and i've an excep