Boost logo

Boost :

From: Rainer Deyke (root_at_[hidden])
Date: 2001-08-11 15:04:32

----- Original Message -----
From: "David Abrahams" <david.abrahams_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, August 11, 2001 11:28 AM
Subject: Re: [boost] multiple boost::python modules in the same file

> ----- Original Message -----
> From: "Maximiliano Caceres" <maximiliano.caceres_at_[hidden]>
> >
> > Is there a way of defining multiple modules inside of the same
> I'm pretty sure there's no way to do that. You could ask the same question
> on the general python lists about 'C' extension modules. If there's no way
> to do it for regular extension modules, there's no way to do it with
> Boost.Python.

Any Python extension module can create an arbitrary number of new Python
modules at arbitrary points in the code by simply calling the appropriate
functions of the Python extension API. If boost::python doesn't support
this, then that is a design flaw in boost::python.

Rainer Deyke (root_at_[hidden])
Shareware computer games           - 
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
> > I'm currently "wrapping" a whole c++ framework into python, and I'd like
> to have
> > a single python import, but also I'd like to preserve some
> > structure inside python (using module names).
> Oh, that you can do. Just use the python package system. You'll still need
> to make separate C++ modules, though. If you only want one extension
> just make a framework of Python modules which import the appropriate
> bindings from the single extension module.
> > I know it sounds a little strange, the idea is that I have a whole bunch
> of
> > DLLs, they will all be used in python almost at the same time, and I
> want
> > to link boost::python in each one separately if I can do that just once.
> I can understand that. Making a Boost.Python DLL so that /all/ extension
> modules can share the common object code is a TODO item for the
> team.
> > So, if I call python::module_builder twice in the same
> > I get an assertion.
> >
> > looking at cvsweb
> >
> modu
> > le_builder.cpp)
> > it looks like revision (branch?) fixes this
> >
> > is this an official change? is anybody working on this? shall I get it
> from
> > cvs.sourceforge ?
> Uh, OK... I don't think that change was designed to do what you want, but
> all means, try it. I also thought that Ralf had integrated these changes
> into the main trunk long ago, but I could be wrong.
> -Dave
> Info:  Unsubscribe:
> Your use of Yahoo! Groups is subject to

Boost list run by bdawes at, gregod at, cpdaniel at, john at