views:

81

answers:

1

Hello everyone. I am using wxPython and Py2exe to create my application and my only problem is loading for example bitmaps.

Ok so lets say I want to add an image to my application, and thats fairly easy using wxPython, and lets say it is on the same directory of my .py so for example:

image = wx.StaticBitmap(self, -1, wx.Bitmap('image.bmp')

Now, this works obviously fine, problem is when I convert to Py2exe, I would like to use the resources from the dlls that I included in the Py2Exe compilation.

So basically what I want to do is to instead of including the images on the same folder as my application in order to work, I would like to use it from the resources so people won't see the images on the folder.

+2  A: 

Have a look at img2py. This tool is designed to convert images into python files you can import and package using py2exe.

RSabet
though this won't really 'hide' his images, like he seems to want to do
Steven Sproat
+1 Also, for a more complete discussion, see http://groups.google.com/group/PyInstaller/browse_thread/thread/e999838588e7fd99
tom10