[C++-sig] Multiple Interpreters Using Boost.Python?

Lawrence Spector Lawrence.Spector at CanfieldSci.com
Mon Jul 2 16:37:25 CEST 2007


Yes, what I meant by multiple interpreters is that I can execute
multiple scripts from the same program with no interference.  How can
this be done?

Also, you meant a global interpreter lock.  Does this mean that two
different scripts won't technically execute at the same time?  I would
like this to scale to multiple processors well.

Thanks,

Lawrence

-----Original Message-----
From: c++-sig-bounces at python.org [mailto:c++-sig-bounces at python.org] On
Behalf Of Stefan Seefeld
Sent: Monday, July 02, 2007 10:06 AM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Multiple Interpreters Using Boost.Python?

Lawrence Spector wrote:
> Hello again.  I know by default, the Python API only supports one
> interpreter per process, but I believe there is a way to configure it
> for multiple interpreters.  If so, does Boost.Python support this?  Is
> there any additional steps for Boost.Python to do this, or is it
> automatic?

What do you mean by 'interpreter' ? What's your use case, exactly ?
There is a single 'python runtime' linked to your program, and some
global variables are shared throughout the process (such as the
GIL (Global Interpreter Lock)). However, if all you want is execute
('interpret') multiple python scripts from within your application
without them interfering with each other, that's quite trivial to do
with the existing API.

Regards,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...
_______________________________________________
C++-sig mailing list
C++-sig at python.org
http://mail.python.org/mailman/listinfo/c++-sig



More information about the Cplusplus-sig mailing list