From: Kevin A. <al...@se...> - 2001-08-30 20:10:24
|
Cool. The Bitmap class in widget.py might have to be refactored to support what you are working on, but then again maybe not. Bitmap should probably be put into its own module file along with other bitmap and image manipulation functions and classes. We can do this as you get closer. Remember that for the most part the wxPython objects are hidden inside our own classes, typically they are the _delegate attribute in a class. That will impact pickling something like a Bitmap, which you probably don't want to do. The file extension is used to automatically determine the file type right now. We can extend the current resource format to support other "globals" such as what you're describing, so they could be automatically loaded and available in an image list or dictionary. ka > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of Jeff > Griffith > Sent: Thursday, August 30, 2001 12:42 PM > To: pyt...@li... > Subject: [Pythoncard-users] Icon Packs > > > > I've decided to begin work on 'icon packs' for the pythoncard project. > If you look through the source code for the wxPython demo, you'll notice > some of the images are embedded in the code. They use a combination of > zlib and pickle to accomplish this. I've already started work on a > script that will store images in .py files. This would allow icons to > be imported into your projects instead of loaded off the filesystem. > > ... here is a pretend python session > > >>> from icons.gtk import * > >>> saveas_icon > <object wx_image> > >>> open_icon > <object wx_image> > > This would also ease the distribution of pythoncards if most all the > deliverables are .py files that py2exe could easily pack. > > I'll keep you guys uptodate on its progress. > > Thanks > -Jeff Griffith |