[C++-sig] Re: Presenting a Python embedding tutorial for Boost.Python

Dirk Gerrits dirk at gerrits.homeip.net
Wed Dec 11 09:23:04 CET 2002


Mike Rovner wrote:
> "Dirk Gerrits" <dirk at gerrits.homeip.net> wrote in message
> news:at59bp$skj$1 at main.gmane.org...
> 
>>Furthermore, there should be a way to set/query the currently active
>>interpreter. Member functions like this:
>>
>>     bool is_current() const;
>>     void make_current();
>>
>>were the first things that came to mind.
> 
> 
> How about being consistent with scope() interface?
> Creating new interpreter changes current, but one can create
> objects to keep and use another.
> 
> Just my 2c.

I like the idea of making the new instance the current interpeter. I'm 
just not so sure what the destructor of the current interpreter should 
do. Perhaps the most current interpreter still in scope should be looked 
up in an interpreter registry? Or would it make sense to have no current 
interpreter at all?

I just don't know enough about creating and using sub-interpreters at 
this point.

Dirk Gerrits







More information about the Cplusplus-sig mailing list