I have a wxPython application that I am communicating with exe using py2exe. I defined the icon in the file setup.pyusing the following:
setup(
windows=[
{
'script': 'myapp.py',
'icon_resources': [(1, 'myicon.ico')]
},
],
)
This works, but I would like to access this icon from my wxPython application and use it as the window icon that appears in the upper right corner. Currently, I use the following to download the icon from the file system:
icon = wx.Icon('myicon.ico', wx.BITMAP_TYPE_ICO, 16, 16)
self.SetIcon(icon)
Which works, but requires the icon to sit next to the EXE, and not be inserted inside it.
source
share