setting icon using py2exe?

Grant Edwards grante at
Thu Jul 1 08:26:42 CEST 2004

On 2004-07-01, simo <simoninusa2001 at> wrote:

>> I've done that.  The desktop icon and start menu icon are set
>> by InnoSetup, but the icon doesn't show up in the window
>> banner or in the task bar.  I was assuming that setting the
>> icon resource in the executable would fix that.
> No, you have to set the icon from wxPython for the TaskBar and
> window icon, py2exe only fixes the *executable's* icon (in
> Explorer).

It seems odd that by default Windows won't use the executable's
icon for its window.  But, a lot of things in Windows seem odd
to me...

> In your mainWindow(wx.Frame) do:
>   self.icon = wx.Icon("hellow.ico", wx.BITMAP_TYPE_ICO)
>   self.SetIcon(self.icon)

Yup, that does it.

> This works on Linux too (for window and Panel), which I was
> quite pleased with, especially as I didn't even do an XPM
> version, just the ICO file....

That's cool! It didn't even occur to me to try to use the .ico
file under Linux.

Grant Edwards                   grante             Yow!  "DARK SHADOWS"
                                  at               is on!! Hey, I think
                                 the VAMPIRE forgot his

More information about the Python-list mailing list