Multiple simultaneous Python interpreters

Oren Tirosh oren-pl-l at
Wed Mar 19 18:53:50 CET 2003

On Wed, Mar 19, 2003 at 02:44:04AM -0800, White Flame (aka David Holz) wrote:
> Hi, I'm evaluating Python as a scripting language in a project I'm defining.
> Is there any way to encapsulate the interpreter so that multiple ones can
> exist in a program?  Some would be in their own thread, some would get
> called from the same one sequentially.  However, in the docs I've read,
> there's always just been one "global" interpreter.  Not very OO for an OO
> language. ;-)

Unfortunately, the CPython implementation fo the Python language uses a 
lot of glboal state. With the Jython implementation you can instantiate
multiple independent interpreters. If a Java environment is acceptable
to you it might be a solution.


More information about the Python-list mailing list