[Edu-sig] need help on python´s glob module

Emmanuel Viennet emmanuel.viennet@lipn.univ-paris13.fr
Sun, 25 Mar 2001 19:12:11 +0200


 glob returns an unsorted list of matching files.
You can call the sort() method to get what you want:
 
import glob

filelist = glob.glob( '*.py' )
filelist.sort()

for filename in filelist:
    # process filename...


Enjoy !
Emmanuel