[C++-sig] BOOST_PYTHON_MODULE across several files
Paul F. Kunz
Paul_Kunz at SLAC.Stanford.EDU
Wed Dec 25 22:03:21 CET 2002
>>>>> On Tue, 24 Dec 2002 15:52:11 +0000, William Trenker <wtrenker at hotmail.com> said:
> Is there a way to spread a BOOST_PYTHON_MODULE definition across
> multiple files?
Here's what Matt Langston did to my library...
ExportToPython.cxx ...
---
BOOST_PYTHON_MODULE(hippo)
{
export_CanvasWindow();
export_NTuple();
export_QtDisplay();
export_QtCut();
export_Function();
export_Canvas();
export_HDApp();
}
--
then for example in CanvasWindow.cxx ...
---
void PyHippo::export_CanvasWindow()
{
class_ < CanvasWindow > ( "CanvasWindow" )
.def ( "show", &CanvasWindow::show )
.def ( "fileNew", &CanvasWindow::fileNew )
;
}
---
One needs to add the appropriate .h files.
More information about the Cplusplus-sig
mailing list