Well... I was not refering to the systray icon (system tray) or at least I think so...I am  not sure of the correct term. Anyway the setup I sent (lost in your reply) was for the application/program icon (the icon you click twice to start the program, the "myprogram.exe" icon ).

About your comment on the frame icon (the one normally at the top left of your app windows), You friend can easily put a different icon into each frame of your App. You just have to encode the images (ICON1, ICON2, etc) as I explained before and then to set self.SetIcon(_icon_numberx) for each frame. This is with wx.Python. Im  never did it  with python Card

Date: Tue, 6 May 2008 10:49:37 -0700
From: cappy2112@gmail.com
To: gatoygata@hotmail.com
Subject: Re: [Py2exe-users] How to distribute embedded icons
CC: py2exe-users@lists.sourceforge.net

Thanks Joaquin,

I think the real problem I was seeing IS the image icon, not the systray icon.
I had thought about generating this on the fly but thought it wouldn't work.

I'll look into this approach.

Speaking of icons- a friend of mine is trying to figure out how to get several different icons associated with different windows, in the same app. I guess his main app spawns multiple screens- but he wants to associate a different icon with each screen.
He's using Pythoncard- but it's still wx under the covers.
>>for a frame icon (the small icon in the frame) I encode a smaller image using the base64 module and  I copy/paste de generated >>ICON string  into a  image.py file. Then, a run time  I regenerate it  in  the main frame (a wx.python  frame) with:

        def decode_ico(self):
            imgico = self.prepara(ICON)
            _icon = wx.IconFromBitmap(wx.BitmapFromImage(imgico))
      def prepara(self, data):
            img = base64.decodestring(data)
            flhndl = cStringIO.StringIO(img)
            return  wx.ImageFromStream(flhndl, wx.BITMAP_TYPE_ANY)

hope this helps

Date: Mon, 5 May 2008 20:30:18 -0700
From: cappy2112@gmail.com
To: py2exe-users@lists.sourceforge.net
Subject: [Py2exe-users] How to distribute embedded icons

Is there a way to include an icon file in the actual exe itself, so a separate file doesn't need to be distributed with the application?

My setup.py file looks like this, but when I try to run the exe from the dist directory, an error is displayed because the icon is not present.
When I copy the exe to the same directory as the ico, the problem is resolved.

trgt = Target(
                      description     = "My App",
                      # what to build
                      script          = "MyScript.py",
                      other_resources = [(RT_MANIFEST, 1, manifest_template % dict(prog="MyScript"))],
                      icon_resources = [(1, "MyScript.ico")],
                      dest_base       = "MyScript"

setup( options    = \
       { "py2exe": { "compressed"  : 2,

                     "optimize"    : 1,

                     "ascii"       : 1,
                     "bundle_files": 0,

                     "excludes"    : ['wingdbstub'],

                     "includes"    : [],

                     "dll_excludes" : [],
                     "packages"     : ['encodings'],


         windows = [trgt], zipfile= None

Sigue de cerca las últimas tendencias y lo que más rompe MSN Vídeo

Sigue de cerca las últimas tendencias y lo que más rompe MSN Vídeo