multiple embedded python interpreters?

Darrell Gallion darrell at dorb.com
Mon Oct 2 16:46:01 EDT 2000


You may be able to use a single interpreter.
Check out exec
    exec yourBuf in globalVarDict, localVarDict

Would this give you enough isolation ?
Maintain a separate globals and locals for what would have been separate
interpreters.

If perfect isolation is your game, then pyro might be the ticket.
Pyro makes IPC a dream, so you spawn off interpreter servers as needed. Then
use pyro to talk to them.

--Darrell


From: <allen at webg2.com>
> >From the C API it appears that only a single implicit python interpreter
> may be embedded in an application. Is this really the case? I was hoping
> for something along the lines of Tcl_CreateInterp which would return me
> a pointer to an initialized interpreter. As I am unfamiliar with the de-
> sign goals of python in the embedded interpreter space, I am really cur-
> ious if this is the case, and what is the rationale.
>
> hoping I don't have to use Tcl after all... :-(
>






More information about the Python-list mailing list