Re: [C++-sig] Alternate locations for BOOST_PYTHON_MODULE

2013-06-12 Thread Alex Leach
On Wed, 12 Jun 2013 11:34:24 +0100, Holger Brandsmeier wrote: Trevor, ok, so I misunderstood your question. If what you want to do is this: myclass.h class MyClass { [...] }; pythonFile.cpp #include "myclass.h" [...] BOOST_PYTHON_MODULE(...) { [...] } That is certainly possible

Re: [C++-sig] Alternate locations for BOOST_PYTHON_MODULE

2013-06-12 Thread Holger Brandsmeier
Trevor, ok, so I misunderstood your question. If what you want to do is this: myclass.h class MyClass { [...] }; pythonFile.cpp #include "myclass.h" [...] BOOST_PYTHON_MODULE(...) { [...] } That is certainly possible, I think almost everyone (including me) does it like this. > Also,

Re: [C++-sig] Alternate locations for BOOST_PYTHON_MODULE

2013-06-12 Thread Trevor Haba
Holger, Thanks for the reply. I'm a little bit confused about the .inl file. Sorry if these are obvious questions, I'm still somewhat new at this. So this "pfemPy.inl" is what actually contains the python bindings? So the commands like class_("foo").def(...) are in the .inl file? Are these wra

Re: [C++-sig] Alternate locations for BOOST_PYTHON_MODULE

2013-06-12 Thread Holger Brandsmeier
Trevor, that is certainly possible, all my python exports look like this: #include "pfemPy.inl" BOOST_PYTHON_MODULE(pfemPy) { PfemInst::call(); } // boost module Then e.g. in "pfemPy.inl" I wrap and export the C++ classes. The file "pfemPy.inl" in turn includes the header of the required sour

[C++-sig] Alternate locations for BOOST_PYTHON_MODULE

2013-06-12 Thread Trevor Haba
Hello, I am attempting to make a large pre-existing code base accessible to python, so that I can run quick scripts to automate the behavior of certain classes for testing purposes. We are using C++ and python 3.3 with the boost.python library. I have a script to automatically generate the BOOS