Python Forum

Full Version: Mixing 2 versions of python in one C++ application
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have a python embedded C++ application, and currently using python 2.7.13.
Now I want to introduce a new component in this application (dll/.so, loaded dynamically), and this new component also uses python, but version 2.5. The functionality that uses python in this new component fails.

My question is, can i have this kind of mix? Can i kind of unload (Py_Finalize and then do Py_SetPythonHome and Path) and load the new component dll which would do its Py_Initialize after doing the Py_SetPythonHome and path to the Python25 folder?

Thanks in advance
Satya