[python-win32] Re: Py2exe problem

Thomas Heller theller at python.net
Tue Dec 30 11:04:25 EST 2003


"Bill Harris" <wb_harris at hotmail.com> writes:

> Hi,
> I am running into the following problem, and I hope someone here can help
> me.
>
> I am developing a wxPython application using Boa constructor (v 0.2.3) and
> wxPython 2.4 and Python 2.3.2. I am running Windows XP Pro, Service Pack 1
>
> One of my modules uses strptime in the time module. I have a straight
> forward import:
> from time import *
>
> The program runs fine under boa, but when I build a Windows executable using
> py2exe with the -w option, I get the following ImportError  - 'no module
> found _strptime'.

Ah, timemodule.c imports '_strptime' from C code, which py2exe cannot
track.  Adding a '-i _strptime' command line switch when running
'setup.py py2exe' should do the trick.

Thomas




More information about the Python-win32 mailing list