Stefan Seefeld wrote: > You need a module into which to inject the symbols you export. That is > true no matter the (meta)type of what you export, i.e. classes, > functions, etc. > Once you have that module set up (via BOOST_PYTHON_MODULE), you can > instantiate the newly created Python objects (types) from within C++ > code, without having to go through the interpreter, import, eval, or exec.
So you say I may use BOOST_PYTHON_MODULE to define a module and then immediately work with it? Hm - I failed with that at my very first try. What I did was using BOOST_PYTHON_MODULE and after that calling bpy's import() to add it to my global namespace what failed due to not finding the module. So I assumed I would have to build my module as extension to be able to load it. But as I said, I want to stay monolithic. Could you please show some sample code how you think I can achieve my target using BOOST_PYTHON_MODULE? Here's my goal again: I want to use exec_file() with an already imported module providing access to some C++ functions and classes - all in one binary. _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig