python Programming Glossary: image_factory
Python dynamic inheritance: How to choose base class upon instance creation? http://stackoverflow.com/questions/7057019/python-dynamic-inheritance-how-to-choose-base-class-upon-instance-creation instance of an image object the user is asked to call the image_factory function with a file path as only parameter. This function then.. a file object in order to do this. import os # # def image_factory path '''Guesses the file format from the file extension and.. i image_factory 'images lena.png' print i.format print i.get_pixel 5 The compressed..
|