Okay. This is almost solved. I just need to know how to have each entry in my final list have the full path, not just the file name. Also, I've noticed that files are being found within hidden directories. I'd like to exclude hidden directories from the walk, or at least not add anything within them. Any advice?
Here's what I've got so far: def getFileList(): import os imageList = [] for files in os.walk(os.getcwd(), topdown=True): imageList += [file for file in files[2] if file.endswith('jpg') or file.endswith('gif')] return imageList -- http://mail.python.org/mailman/listinfo/python-list