Hello all, I have a problem here. I have a list named list_of_files which contains filenames with their timestamps attached to the name. If I have a string "fstab", and I want to list out the files in whose names the word fstab appears should I go about like this :
def listAllbackups(file): list_of_files = os.listdir("/home/shriphani/backupdir") for element in list_of_files: if element.find(file) != -1: date = ### time = #### return (date, time) The major trouble is that the return statement causes it to exit after attempt one. How do I use the yield statement here? Regards, Shriphani Palakodety -- http://mail.python.org/mailman/listinfo/python-list