Changes between Initial Version and Version 1 of Ticket #13928, comment 19


Ignore:
Timestamp:
01/08/13 22:06:10 (7 years ago)
Author:
nbruin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13928, comment 19

    initial v1  
    44{{{
    55for path,dirnames,lfiles in os.walk(walkdir):
    6     for i in range(len(dirnames)-1,-1,-1):
    7         if len(dirnames[i]) > 0 and dirnames[i][0] == '.':
    8             del dirnames[i]
    9     for i in range(len(lfiles)-1,-1,-1):
    10         if len(lfiles[i]) > 0 and lfiles[i][0] == '.':
    11             del lfiles[i]
     6    dirnames[:]=(n for n in dirnames if len(n) == 0 or n[0] != '.')
     7    lfiles[:]=(n for n in lfiles if len(n) == 0 or n[0] != '.')
    128    <do your processing here>
    139}}}