Any embedding guru out there?

T

Ticachua

Hi,

I'm working with an embedded Python C++ application. This application
allows me to run python scripts alright. However, one of my scripts
requires importing extension modules such as socket. The script bombed
when I tried to run it. It turned out that this application only runs
Python scripts that use Pythoncore modules only.

Unfortunately I do not have access to the source code of this
application
at this point. In desparate attempt, I rebuilt the _socket.pyd and
placed it
in the path where the python.dll (pythoncore library) of this tool
resided.
Well, the script bombed again. However through the debugger's trace I
found something interesting.

1. C:\AutoScript\python.dll was loaded <--- embedded in app
2. D:\python\DLLs\_socket.pyd was loaded <---- came with Python I
installed on
my machine
3. C:\WINNT\System32\python23.dll was loaded <--- Python I installed
on my machine

Apparently the application was able to find and load _socket.pyd
(hmmm,
not the one I put under C:\AutoScript). However, socket lib uses
pythoncore, hence, python23.dll was loaded. Since 2 different versions
of Pythoncore libs got loaded, it got confused and crashed. This very
likely has something to do with the path setting. I checked the
Windows registry. I could not find any key with reference to
python23.dll so I could trace where the key was used.

Your time is appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top