I've made that patch already, had a similar problem with shell.pyd; that's not causing my problem.

my versions are: python 2.3.4, pywin32 build 202  and ctypes 0.9.2.

So, does app.exe run for you without complaining about pywintypes?

Thanks for your help,

On 9/28/05, Jimmy Retzlaff <jimmy@retzlaff.com> wrote:
H.R.Gartenbauer wrote:
> When using bundle 1 or 2, I get an error when trying to run the .exe:
> Traceback (most recent call last):
> File "app.py", line 13, in ?
> File "zipextimporter.pyc ", line 78, in load_module
> File "win32com\client\__init__.pyc", line 12, in ?
> File "zipextimporter.pyc", line 78, in load_module
> File "win32com\client\dynamic.pyc", line 24, in ?
> File "zipextimporter.pyc", line 78, in load_module
> File "win32com\client\build.pyc", line 26, in ?
> ImportError: No module named pywintypes
> PyWinTypes23.dll is included in the zip, but not pywintypes.pyc.

With Python 2.3.5, pywin32 build 204, and ctypes 0.6.2 I get an error when building:

error: C:\test\build\bdist.win32\winexe\collect-2.3\win32com.shell\shell.pyd: No such file or directory

That error goes away and app.exe runs fine after patching py2exe as follows:

Change the file C:\Python23\Lib\site-packages\py2exe\build_exe.py:
Find the line
    package = ".".join(item.__name__.split(".")[:-1])
and change it too:
    package = "\\".join(item.__name__.split(".")[:-1])

Note that a new version of py2exe incorporating this patch will be out soon.

Do any of the versions you are using differ from what I used?