embed images for wxpython

bradleyd syhsolutions at comcast.net
Thu May 3 18:19:21 PDT 2007


Hello everyone,
I am having trouble with a wxpython app. I have some images on the ui 
and they are hardcoded into the code:
self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap("images/log2.png", 
wx.BITMAP_TYPE_ANY))
self.bitmap_2 = wx.StaticBitmap(self, -1, wx.Bitmap("images/logo4.png", 
wx.BITMAP_TYPE_ANY))

This works great if I run the application from it's own folder. If I 
make a desktop launcher the images do not show because they are looking 
for images folder. I can not hardcode my own path 
/home/me/app-folder/images , because this app will be installed on 
multiple machines in different home directories. Is there a way to embed 
the image? or some other way to point to install directory image folder?
Thanks,
Brad
p.s. I am freezing the app before install on other machines.




More information about the wxpython-users mailing list