How to use my icons when compiling my python program with py2exe?

I do not know what commands you need to enter in the setup.py file when compiling a python program to use my icons. Can someone help me? Thanks in advance.

+3
source share
2 answers
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", 
)
+5
source

I have not tried this, but here is the link I found:

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

+4
source

Source: https://habr.com/ru/post/1699557/


All Articles