Multiple simultaneous Python interpreters

Aahz aahz at pythoncraft.com
Wed Mar 19 10:10:13 EST 2003


In article <b59hcu$2f10$1 at barad-dur.nas.com>,
White Flame \(aka David Holz\) <whiteflame52 at y.a.h.o.o.com> 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. ;-)

Generally speaking, that doesn't work very well.  However, you can use
the Twisted framework to easily set up multiple processes that
communicate with each other: http://www.twistedmatrix.com/
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Register for PyCon now!  http://www.python.org/pycon/reg.html




More information about the Python-list mailing list