setting icon using py2exe?

Thomas Heller theller at python.net
Wed Jun 30 07:16:46 EDT 2004


Grant Edwards <grante at visi.com> writes:

>>  2) According to http://starship.python.net/crew/theller/moin.cgi/CustomIcons
>>     you can set the icon_resources in the setup.py like this:
>>
>>       # setup.py
>>       from distutils.core import setup
>>       import py2exe
>>       setup(windows=[{"script":"vfcupdate.py","icon_resources":[(1,"rivatek.ico")]}])
>>
>>     That doesn't work either:
>
>>         File "C:\Python23\Lib\site-packages\py2exe\build_exe.py", line 577, in build_executable
>>           add_icon(unicode(exe_path), unicode(ico_filename), ico_id)
>>       RuntimeError: MapExistingFile: The handle is invalid.
>
> Never mind....
>
> Further googling reveals this is a known bug when running under
> Win98/Me:
>
> http://groups.google.com/groups?th=4d594c535345b98b

The bug should be fixed in CVS.  Since py2exe now can also be built with
MingW32, you could try that, even if you don't have MSVC.  Or you have
to wait for the release.

Thomas



More information about the Python-list mailing list