jay graves wrote: > On Mar 10, 9:28 am, Robert Bossy <[EMAIL PROTECTED]> wrote: > >> Personally, I'd use glob.glob: >> >> import os.path >> import glob >> >> def parsefolder(folder): >> path = os.path.normpath(os.path.join(folder, '*.py')) >> lst = [ fn for fn in glob.glob(path) ] >> lst.sort() >> return lst >> >> > > Why the 'no-op' list comprehension? Typo? > My mistake, it is:
import os.path import glob def parsefolder(folder): path = os.path.normpath(os.path.join(folder, '*.py')) lst = glob.glob(path) lst.sort() return lst -- http://mail.python.org/mailman/listinfo/python-list