clinton
clinton

Reputation:

How do I use my icons when compiling my python program with py2exe?

I don't know what commands to enter into the setup.py file when compiling a python program to use my icons. Can anyone help me? Thanks in advance.

Upvotes: 4

Views: 589

Answers (2)

Kirill Titov
Kirill Titov

Reputation: 2099

from distutils.core import setup
import py2exe
setup(
        windows=[{"script": 'app.py', "icon_resources": [(1, "icon.ico")]}],
        options={"py2exe":{"unbuffered": True,
                        "optimize": 2,
                        "bundle_files" : 1,
                        "dist_dir": "bin"}},
                        zipfile = "lib.zip", 
)

Upvotes: 6

Lasse V. Karlsen
Lasse V. Karlsen

Reputation: 391276

I haven't tried this, but here's a link I found:

http://www.py2exe.org/index.cgi/CustomIcons

Upvotes: 4

Related Questions