[Python-Dev] Safe to change a thread's interpreter?

"Martin v. Löwis" martin at v.loewis.de
Mon Aug 2 06:19:57 CEST 2004


Phillip J. Eby wrote:
> Recently I've been researching implementation strategies for adding Java 
> classloader-like capabilities to Python.  I was pleasantly surprised to 
> find out that CPython already supports multiple interpreters via the C 
> API, where each "interpreter" includes fresh versions of 'sys', 
> '__builtin__', etc.

You should be aware that many of us consider the feature of multiple
interpreters broken. For example, global variables in extension modules
are shared across interpreters, and there is nothing that can be done
about this, except for changing the entire C API.

Regards,
Martin


More information about the Python-Dev mailing list