icon resource in setup script

Thomas Heller theller at python.net
Fri Jul 2 18:09:11 CEST 2004


"Joe Wong" <joewong at 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



More information about the Python-list mailing list