On Sun, 11 Nov 2007 21:03:33 -0800, [EMAIL PROTECTED] wrote: > one scheme suggested was to create a string from the names of sorted > image files and give it as the cache name.. > ie ,if i have one.jpg,three.jpg,new.jpg , > i will name the cache as 'newonethree.cache' and everytime i want to > check if new image added/removed i wd create a string from the > contents of folder and compare it with cachename. > > this scheme is ok for a small number of files,..
Not really. `xxx.jpg` -> `xxx.cache` Now `xxx.jpg` is deleted and `x.jpg` and `xx.jpg` are created. `x.jpg`, `xx.jpg` -> `xxx.cache` > can someone suggest a better way? i know it is a general programming > problem..but i wish to know if a python solution exists Don't store the names in the cache file name but in the cache file. Take a look at the `set()` type for operations to easily find out the differences between two set of names and the `pickle` module to store Python objects in files. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list