icon resource in setup script

J

Joe Wong

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
 
T

Thomas Heller

Joe Wong said:
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
 
S

simo

Joe Wong said:
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")]
}
],
)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top