Multiple interpreters in a single process

Maciej Sobczak no.spam at
Mon Jan 5 15:37:47 CET 2004


I'm interested in embedding the Python interpreter in a C++ application.
What I miss is the possibility to create many different interpreters, so 
that the stuff that is running in one interpreter does not influence the 
other. In essence, the interpreter can be used in different modules of a 
single application. It would be nice to isolate them.

There are two possibilities:

1. The interpreters need to run in paraller (from different threads of 
the master application). Definitely, separate interpreters are needed.

2. Different modules use a single Python interpreter in non-overlapping 
times. At least the possibility to clean up the interpreter is needed.

Is this problem easy to solve? Or maybe are there alternative approaches 
(switchable dictionaries, etc.)?

Thank you very much,

Maciej Sobczak :
Programming    :

More information about the Python-list mailing list