backend.py
changeset 16 da8160da8d3e
parent 15 fa7016d48317
child 20 c936066cff62
equal deleted inserted replaced
15:fa7016d48317 16:da8160da8d3e
   723                     kxml = True
   723                     kxml = True
   724             elif type(arg) is unicode or type(arg) is str:
   724             elif type(arg) is unicode or type(arg) is str:
   725                 filemask = arg
   725                 filemask = arg
   726 
   726 
   727         if filemask[0] == '/' or filemask[0] == '.':
   727         if filemask[0] == '/' or filemask[0] == '.':
   728             files = glob(filemask)
   728             files = sorted(glob(filemask))
   729         else:
   729         else:
   730             files = []
   730             files = []
   731             for directory in includePath:
   731             for directory in includePath:
   732                 path = os.path.join(directory, filemask)
   732                 path = os.path.join(directory, filemask)
   733                 files.extend(glob(path))
   733                 files.extend(sorted(glob(path)))
   734 
   734 
   735         if reverse:
   735         if files and reverse:
   736             files = files[-1::-1]
   736             files = files[-1::-1]
   737 
   737 
   738         if not(files):
   738         if not(files):
   739             if included:
   739             if included:
   740                 raise IOError(u"in " + included + ":" + u(line) + u": include file(s) '" + filemask + u"' not found")
   740                 raise IOError(u"in " + included + ":" + u(line) + u": include file(s) '" + filemask + u"' not found")