Here's my code ======================================================== filelist={} def listFiles(self, dirName, filesInDir): for fname in filesInDir: if os.path.isfile(fname): key = os.path.join(dirName, fname) stats = os.stat(fname) filelist[key] = (stats[stat.ST_MTIME], stats[stat.ST_SIZE]) os.path.walk(string.strip(self.path.get()), listFiles, None) print filelist ======================================================= I change: if not os.path.isdir(fname) to if os.path.isfile(fname) because some directories are not recognized as directory, and I get an error message because os.stat is called with the directory as arg. But even after I change it into isfile(). There are still some errors,..some images in the subdirectories won't get printed... Help please....
-- http://mail.python.org/mailman/listinfo/python-list