Our scenario is this:
OS is Win32.
We have a C++ program which calls Python. I also uses a DLL which calls
Python via COM and Windows Active scripting.
If the program is compiled to use the Debug Multithread Runtime DLL
everything works fine (it appears that the program loads python20_d.dll and
the scripting engine loads  
pythoncom20.dll which loads python20.dll).
If the program is compiled to use the non-Debug Multithread Runtime DLL it
dies with "Fatal Python error: PyEval_AcquireThread: non-NULL old thread
state" (it appears that the program loads python20.dll, the scripting engine
loads pythoncom20.dll). 
My suspicion is that when the debug and non-debug versions are being used
two copies of the interpreter are being loaded but when everything is
non-debug only one copy of the interpreter is loaded resulting in a thread
conflict. I've tried doing a "PyEval_ReleaseLock()" before the call that
results in the scripting engine being called but to no avail.
Does my suspicion sound correct and does anyone have any ideas?

Thanks
Paul

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to