Multiple python interpreters within the same process

Josiah Carlson josiah.carlson at sbcglobal.net
Sun Jun 10 01:07:26 CEST 2007


André wrote:
> On Jun 9, 5:00 pm, "Marcin Kalicinski" <kal... at poczta.onet.pl> wrote:
>> How do I use multiple Python interpreters within the same process?
>>
>> I know there's a function Py_NewInterpreter. However, how do I use functions
>> like Py_RunString etc. with it? They don't take any arguments that would
>> tell on which interpreter to run the string...?
>>
>> Marcin
> 
> You may want to look at the code module http://docs.python.org/lib/module-code.html

That's completely unrelated.

To answer Marcin's question, from what I understand, running multiple 
Python interpreters is not supported.  There are various issues with 
object sharing and refcounts, etc., and are unlikely to be fixed soon if 
ever.

  - Josiah



More information about the Python-list mailing list