[C++-sig] using the same module in different files

Abhi abhi at qualcomm.com
Mon Apr 10 21:34:44 CEST 2006


I have 2 files
- A.h which I want to wrap in a file boost_A.cpp
- and B.h which I want to wrap in a file boost_B.cpp

>>> File A.h

class A
{
  public:
    void fooA();
};

>>> File B.h

class B
{
  public:
    void fooB();
};


File boost_A.cpp wraps class A, while file boost_B.cpp wraps class B.

I want both these files to expose methods in the same module, ie, I want to 
"semantically" use BOOST_PYTHON_MODULE(common) for both these files, so 
that all the methods exposed from boost_A.cpp and boost_B.cpp get imported 
by doing

>> import common
>> a = common.A()
>> b = common.B()


Is this possible?

thanks
- Abhi







More information about the Cplusplus-sig mailing list