I have a python app, that I got from here and modified to my needs, but I would like to put the images I use for icons within the script, I am aware there might be performance issues but it's not a problem at the moment, all I need is leave all the files in one, so I can change with my friends and across my computers easily. So my question is, how can I use an embedded icon image (png files, can be any type) with this line of code that it gets a path to a file, in place of the file itself?
def set_icon(self, path):
icon = wx.IconFromBitmap(wx.Bitmap(path))
self.SetIcon(icon, TRAY_TOOLTIP)
I tried with img2py, base64, nothing worked, so I thought it might be the path needed not the file. How could I change/modify the script (or the wx lib) to make it work with embedded files instead of their paths?