Boost logo

Boost :

From: daveh-lists_at_[hidden]
Date: 2001-08-31 18:49:51


Hi,

I have written some support in boost for python sub modules. This
means that a single code module can support multiple python modules.

It works like this:

    .
    .
    .
    python::module_builder this_module("mymodule");
    python::sub_module_builder mysub_module(this_module, "mysub");
    mysub_module.def(mufunc, "myfunc");
    .
    .
    .

then in python:

import mymodule
print mymodule.mysub.myfunc()

mysub is treated as 'built-in' module of mymodule

So far this has only been tested with MSVC6 SP5

I have added the modified boost python files in the files section
for comments?

Dave Hawkes


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk