Bugs item #1403068, was opened at 2006-01-11 17:02 Message generated for change (Settings changed) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1403068&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Extension Modules Group: None Status: Open Resolution: None Priority: 5 Submitted By: Amaury Forgeot d'Arc (amauryf) >Assigned to: Martin v. Löwis (loewis) Summary: cannot import extension module with Purify Initial Comment: When run with Purify, Python cannot load any extension module. Here is a typical output: Starting Purify'd application... Python 2.4.2 (#46, Jan 3 2006, 16:05:11) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import socket Traceback (most recent call last): File "<stdin>", line 1, in ? File "c:\python\lib\socket.py", line 45, in ? import _socket ImportError: Module use of python24__d$Purify_c_python.dll conflicts with this version of Python. It reproduces with python 2.4.2 and 2.5a0. It works with python 2.3.3. ---------------------------------------------------------------------- Comment By: Amaury Forgeot d'Arc (amauryf) Date: 2006-01-11 17:35 Message: Logged In: YES user_id=389140 The root cause it that Purify renames all DLLs with names like "python24__d$Purify_c_python.dll". With python 2.3, this name was not taken as the python DLL, and no check was performed. The broken logic in my previous comment changed this for 2.4. A more correct fix is to get the python DLL name from the current process, using GetModuleName(PyWin_DLLhModule). ---------------------------------------------------------------------- Comment By: Amaury Forgeot d'Arc (amauryf) Date: 2006-01-11 17:22 Message: Logged In: YES user_id=389140 The pb seems to be in dynload_win.c, line 136: while (*pch && pch[0] != '_' && pch[1] != 'd' && pch[2] != '.') { This means that if a .pyd has "python_something.dll" in its import table, it will be taken as THE python DLL. I think the line should be: while (*pch && (pch[0] != '_' || pch[1] != 'd' || pch[2] != '.')) { ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1403068&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com