468,544 Members | 1,776 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

icon resource in setup script

Hi,

I have encountered an error whenever I put the "icon_resources" line in my setup.py file:

from distutils.core import setup

import py2exe
setup(
windows=[
{'script':"test.py"},
{'icon_resources': [(1, 'smiles.ico')]},
],
)

The error I get:

running py2exe
error: This target class requires an attribute 'script'

How can I make the icon thing work in my script? I tried using --icon but it said --icon is not recognized.

Regards,

- Wong

Jul 18 '05 #1
2 3219
"Joe Wong" <jo*****@mango.cc> writes:
Hi,

I have encountered an error whenever I put the "icon_resources" line in my setup.py file:

from distutils.core import setup

import py2exe
setup(
windows=[
{'script':"test.py"},
{'icon_resources': [(1, 'smiles.ico')]},
],
)

The error I get:

running py2exe
error: This target class requires an attribute 'script'

How can I make the icon thing work in my script? I tried using --icon
but it said --icon is not recognized.


For each target, you must supply *one* dictionary:

setup(
windows=[
{'script':"test.py",
'icon_resources': [(1, 'smiles.ico')]},
],
)
Thomas
Jul 18 '05 #2
"Joe Wong" <jo*****@mango.cc> wrote:
setup(
windows=[
{'script':"test.py"},
{'icon resources': [(1, 'smiles.ico')]},
],
)


You've got too many braces:

setup(
windows = [
{
"script": "test.py",
"icon_resources": [(1, "smiles.ico")]
}
],
)
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Haim Ashkenazi | last post: by
11 posts views Thread by Grant Edwards | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Wayne | last post: by
4 posts views Thread by randy1200 | last post: by
reply views Thread by Vyz | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.