Load resources? - wxPython / Python
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.
Have a look at img2py. This tool is designed to convert images into python files you can import and package using py2exe.
精彩评论