Load python from different plugin dlls
R.Wieser
address at not.available
Thu Feb 13 07:28:55 EST 2020
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
And should probably be done only once - adding the same module to the same
list will likely fail, though the above function will than just return a -1
(minus one) result.
> Py_InitializeEx(Py_IsInitialized() ? 0 : 1);
Initializing when already being initialized might well be the cause of your
AccessViolation - the first plugin looses its objects, but still tries to
use them.
Suggestion: Do a Py_IsInitialized() and if so skip the the Py_InitializeEx()
(and maybe change that one to the simpler Py_Initialize() ).
Hope that helps.
Regards,
Rudy Wieser
More information about the Python-list
mailing list