[C++-sig] python namespace

David Abrahams dave at boost-consulting.com
Thu Nov 21 17:09:11 CET 2002

Francois Ostiguy <ostiguy at fnal.gov> writes:

> When I load the module, here is what I get
> Python 2.2.2 (#1, Oct 28 2002, 17:04:52)
> [GCC 3.1.1] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import outer
>>>> dir()
> ['__builtins__', '__doc__', '__name__', 'outer']
>>>> dir(outer)
> ['__doc__', '__file__', '__name__']
> That is to say, "inner1" and "inner2" are not defined in the "outer"
> scope. The documentation for PyModule_New(char* ) and other related
> functions is terse and not very helpful in terms of explaining how they
> should be used ... I am stumped.

I suggest you ask about this on python-list (or python-dev, but only
if you get radio silence). And leave out any mention of Boost.Python
constructs if possible; it will just confuse people.

I'd very much like to have a working example of this somewhere, so
please report back when you find the answer.


                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

More information about the Cplusplus-sig mailing list