Using latest wxPython release (2.8.4) under Windows XP, I find that
wx.lib.pdfwin can't work with py2exe (.
A program that imports wx.lib.pdfwin will crash upon starting after
being compiled into an .exe file by py2exe.
The error message is something like:
Microsoft Visual C++ Runtime Library
Runtime Error!
Program: D:\test\dist\testwx.exe
The application has requested the Runtime to terminate it in an
unusual way. Please contact the application's support team for more
information.
The test file and its corresponding setup.py file are attached.
Is this a wxPython problem or one of py2exe? Does anyone know of this
and can give a suggestion?
Using latest wxPython release (2.8.4) under Windows XP, I find that
wx.lib.pdfwin can't work with py2exe (.
A program that imports wx.lib.pdfwin will crash upon starting after
being compiled into an .exe file by py2exe.
The error message is something like:
Microsoft Visual C++ Runtime Library
Runtime Error!
Program: D:\test\dist\testwx.exe
The application has requested the Runtime to terminate it in an
unusual way. Please contact the application's support team for more
information.
The test file and its corresponding setup.py file are attached.
Is this a wxPython problem or one of py2exe? Does anyone know of this
and can give a suggestion?
IIRC it's a PyWin32 problem, something like the pythoncom DLLs can't be used from a fully bundled exe. Try using 'bundle_files':3 instead of 1.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Thanks for the tip. Using 'bundle_files':3 indeed prevents the program
from crashing. But it is not enough for showing the PDFWindow control,
due to the very special way PyWin32 com objects are loaded.
After googling and testing, I found the solution to be adding the
typelibs option to setup.py corresponding to the control loaded by
PyWin32. For PDFWindow, the necessary code is:
IIRC it's a PyWin32 problem, something like the pythoncom DLLs can't be
used from a fully bundled exe. Try using 'bundle_files':3 instead of 1.
Thanks for the tip. Using 'bundle_files':3 indeed prevents the program
from crashing. But it is not enough for showing the PDFWindow control,
due to the very special way PyWin32 com objects are loaded.
After googling and testing, I found the solution to be adding the
typelibs option to setup.py corresponding to the control loaded by
PyWin32. For PDFWindow, the necessary code is: