i'm trying to change the compiled exe's icon and such using this script for my setup.py:
setup(name = "Program Title",
version = "1.0",
options = {"py2exe" : {"compressed" : 1,
"optimize" : 2,
"bundle_files开发者_运维问答" : 2 }},
console=[{'script': 'program.py',
"icon_resources": [(0, "icon.ico"), (1, "icon.ico"), (42, "icon.ico")]
}],
description = "some description",
author = "author",
author_email ="some@email.com",
license = "wxWindows Licence",
url = "http://some.website.here,
)
but unfortunately, when it compiles the .ico didn't carry over (is in same dir as program.py and setup.py)
Also i was wondering if it is possible to change the command prompt look a bit by changing the background color and size of the window as it pops up through py2exe... I checked the documentation, but it's not really that helpful. Also window'd mode doesn't work for my program, it requires console.
Check out these tutorials for a colored console:
Bring Colors to the Windows Console with Python
Change Windows Console Character Attribute
The Console Module
For the icon, try this suggestion from CustomIcons:
"Important Note For Adding Multiple Icons On Systems Where This Method Is Not Working: After much research (blood, sweat, and tears), I have found why icons with multiple sizes sometimes do not work. The truth is, is that the order matters. When making the icon, add the larger icon sizes first, then the smaller ones. (e.g. png2ico icon.ico icon_128x128.png icon_64x64.png icon_48x48.png icon_32x32.png icon_16x16.png)"
精彩评论