-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
Sent: 21 March 2001 07:52
To: [EMAIL PROTECTED]
Subject: Debug Build of python Interpreter fails to import Python Module (*.pyd)Hi,
we have a problem with debugging a Python module, namely pysp (http://www.garshol.priv.no/download/software/pysp/).
We managed to build pysp.pyd, both the debug and release version, with the ActivePython 2.0 Build 202.
We did build and test pysp under Windows NT 4.0 sp6 with Visual Studio 6 sp4.The problem we have now:
when we use "python_d -v ..." to invoke a Python script containing "import pysp", we get constantly the error messageActivePython 2.0, build 202 (ActiveState Tool Corp.)
based on Python 2.0 (#8, Mar 20 2001, 15:44:34) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "..\..\..\pysp_0.01\pysp\doc\demo.py", line 5, in ?
import pysp, sys
ImportError: No module named pysp
# clear __builtin__._
# clear sys.pathwe checked everything, both the PythonPath and the Path environment variables are set to include the absolute path to the directory containing both pysp.pyd and sp13.dll. Also using the Dependency Walker does not show any problem.
When we do the same with the release version python.exe we built from the same sources (with the release built of pysp.dll), everything works fine.
Is there a difference in the lookup mechanism for Python modules (*.pyd) between Debug and Release Builds?
Peter
Title: Debug Build of python Interpreter fails to import Python Module (*.pyd)
Try a
second -v and you will then see that python is trying to load
pysp_d.pyd. The _d is use added to all pyd's when using
the
debug version of python. This is because C/C++ code compiled against the python
headers with DEBUG defined
produces code that is incompatible with non-DEBUG
builds.
Barry
- Debug Build of python Interpreter fails to import Python Modu... Peter . Frey
- Barry Scott
