How to run more than one instance of the Python interpreter in one process?

Tom nospam at nospam.com
Tue Jan 9 14:31:38 EST 2001


I used that API with VC6 on Win2K and Python v1.6.  It worked fine.  I only
created one 'sub-interpreter'.

Tom.

"Tim Peters" <tim.one at home.com> wrote in message
news:mailman.978862627.7187.python-list at python.org...
> [Syver Enstad]
> > I am fiddling around with embedding Python in C/C++ and am trying
> > to run one interpreter per thread. I've tried using the
> > Py_NewInterpreter and Py_EndInterpreter for each thread but it
> > doesn't seem to be enough because I trigger access violations in
> > the interpreter so I am obviously missing a couple of things. Are
> > there any examples on how to do these kinds of things other than
> > the very sparse code in the demo folder of the source distribution.
>
> None that I've ever seen, or heard of.  Py_{New,End}Interpreter appeared
to
> have been added during a brief bout of Tcl Envy, and neglected thereafter.
> The natural place to talk about this is the Python Thread-SIG:
>
>     http://www.python.org/sigs/thread-sig/
>
> But, in the past, I was unable to get anyone there to admit they used this
> API either.  You should bring it up there, though; at least Guido may be
> interested.  Be sure to say which version of Python you're using and which
> platform you're running on.
>
> there-are-no-access-violations-under-windows<wink>-ly y'rs  - tim
>
>





More information about the Python-list mailing list