Re: Load python from different plugin dlls

2020-02-13 Thread R.Wieser
Eko, > My test looks like this right now. And there you have a probem, as I have no experience with what those functions do. The below is therefore just a bit of educated guessing, so caveat emperor. > According to the docs PyImport_AppendInittab should be called > before Py_Initialize

Re: Load python from different plugin dlls

2020-02-13 Thread Eko palypse
Thanks for the information. My test looks like this right now. I have two plugins which, when loaded separately, work. But when both are loaded, I get AccessVioletion messages from python37.dll. The init code for both dlls is this: cpp_init_code = f'''#include #include "PluginInterface.h"

Re: Load python from different plugin dlls

2020-02-12 Thread R.Wieser
Eko, > which needs also access to python3.dll but cannot load it itself as it has > been already loaded by plugin1 > > Is such a scenario actually possible? Yes. Normally a DLL can be loaded in as many processes (and threads thereof) as you like. However, it is possible that the DLLs

Load python from different plugin dlls

2020-02-12 Thread Eko palypse
Assuming there is an CppApp which allows extending its functionality by adding plugins. Now let's assume there are plugin developer which use cython to create such a plugins. How can one check if there has been already a plugin loaded which itself loaded a python interpreter? And if this is