Hi Wim,

On Fri, Mar 29, 2013 at 9:14 PM,  <wlavrij...@lbl.gov> wrote:
> The code in question is in pypy/module/cppyy/pythonify.py:
>
> gbl = make_cppnamespace(None, "::", None, False)   # global C++ namespace
> gbl.__doc__ = "Global C++ namespace."
> sys.modules['cppyy.gbl'] = gbl

Indeed, this runs ahead of time --- maybe already at translation time,
actually.  You can move this logic into a function _initialize_gbl(),
and remove the appleveldefs entry for 'gbl'.  Then call this new
function at import time, by adding a method like this in the class
Module in __init__.py:

def startup(self, space):
    space.call_method(space.wrap(self), "_initialize_gbl")


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to