import HTMLutil
def store_image_inventory(directory=os.curdir, file='images.pkl', prefix=None)
The dictionary containing all Image objects derived from a given directory can be saved either as a pickle file to preserve the Image objects or as string HTML representations savable in a marshaled form for performance. Which form happens is a function of the file suffix given as the second argument. If it ends in ".mar" then the Image objects are flattened into plain strings and saved as a marshal file. Any other suffix, including the default ".pkl" will save the dictionary of objects as a pickle file. Note: the marshal form is about two orders of magnitude faster when fetching this dictionary.
Copyright © 1996-9 Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Tue Apr 20, 1999