imp
imp

Reputation: 2087

How to add an icon to an exe developed through py2exe

I am working on windows-7 64 bit machine using python 2.7. Using py2exe to convert mycode.py script into an exe. I am not able to find the reason why icon to an exe is not embedded.

My setup.py is:

from distutils.core import setup
import py2exe
import time
setup(
    windows=[{'script':'MyScript.pyw',
    'icon_resources':[(1,'MyIcon.ico')}],
    options=dict(py2exe=dict(
        packages='keyring.backends',
    )),
)
time.sleep(2)

I also looked into CustomIcons, q&a.

Upvotes: 0

Views: 1144

Answers (1)

Ross Tajvar
Ross Tajvar

Reputation: 129

Resource Hacker might be helpful.

Upvotes: 2

Related Questions