Filter can be replaced with IMHO the more readable list comprehensions.
I would try
def get_fles(exts,upd_dir):
"return list of all the files matching any extensions in list exts"
fle_list = []
for each in exts:
ext_ls = glob.glob("%s*.%s" % (upd_dir,each))
fle_list.extend(ex
I have the following code in my updates script (gets the five most recent
updated files on my site)
def get_fles(exts, upd_dir):
'''return list of all the files matching any extensions in list exts'''
fle_list = []
for each in exts:
cmd = upd_dir + "*." + each
ext_ls = glob.glob(cmd)
fl