I have a Python application that I've been using py2exe to produce a
single file executable, with no problems to date (until now). I
recently had to write a C extension for it to access some Btrieve
tables, and this works fine from the traditional interpreted Python,
but the exe now crashes when loading the import module (using
PY2EXE_VERBOSE=2 shows it finding the module in the internal ZIP
file, and then dying).
If I exclude the extension module from the executable and import it
externally, I get "Fatal Python error: Interpreter not initialized
(version mismatch?)", which is odd as there is only the single version
of Python installed on this box. I've built a simple extension module
that does little more that return a Py_BuildValue() value and built
an exe that successfully imports and uses that module to at least
prove to myself (somewhat) that this should work.
Dependency walker shows only the MPR.DLL module with an unresolved
import, but this occurs in both the working and "non-working"
extensions, and appears to be a known and non-relevant issue
anyway. Are there any ideas on how I could debug this further?
Windows XP (sans service packs)
Btrieve: 8.something (can't upgrade this).
Cheers, and thanks in advance.
PS PY2EXE_VERBOSE needs to be more publicly known about - I just
happened to read about it in an unrelated post, and wouldn't have
known about it otherwise ...
"Must have scripting experience; Pearl, Shell, Python, VBScript, Born,
Corn, Awk, Sed" -- Unix job advertisement.