Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -80,8 +80,8 @@ def act_on_results (action,datapath,respath,filter='d'): · 79 unmodified lines | ||
| 80 | 80 | def act_on_files (action,listfiles,listres=None,suffix='.txt',filter='f',sub='\.wav$',**keywords): |
| 81 | 81 | """ execute action(respath) an all subdirectories in respath """ |
| 82 | 82 | if listres and len(listfiles) <= len(listres): |
| 83 | − for i in listfiles: | |
| 84 | − action(i,listres[i],**keywords) | |
| 83 | + for i in range(len(listfiles)): | |
| 84 | + action(listfiles[i],listres[i],**keywords) | |
| 85 | 85 | else: |
| 86 | 86 | for i in listfiles: |
| 87 | 87 | action(i,None,**keywords) |
| @@ -152,6 +152,7 @@ class bench: · 64 unmodified lines | ||
| 152 | 152 | """ run file_exec on every input file """ |
| 153 | 153 | self.orig, self.missed, self.merged, self.expc, \ |
| 154 | 154 | self.bad, self.doubled = 0, 0, 0, 0, 0, 0 |
| 155 | + self.l , self.mean = [], 0 | |
| 155 | 156 | act_on_files(self.file_exec,self.sndlist,self.reslist, \ |
| 156 | 157 | suffix='',filter=sndfile_filter) |
| 157 | 158 | |