Guest User

Untitled

a guest
Feb 23rd, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import fnmatch
  2.  
  3. paths = ['a/x.txt', 'b/y.txt']
  4.  
  5. for path in paths:
  6. if fnmatch.fnmatch(path, '*.txt'):
  7. print 'do things'
  8.  
  9. for path in paths:
  10. if fnmatch.fnmatch(path, '[!b]*'):
  11. print path
  12.  
  13. a/x.txt
  14.  
  15. header_hcho = fnmatch.filter(col_names, '[!NO2_UV.]*');
  16.  
  17. header_hcho = fnmatch.filter(col_names, '[!N]*');
  18.  
  19. header_hcho = []
  20. idx=0
  21. for idx in range(0, len(col_names)):
  22. if col_names[idx].find("NO2_UV") == -1:
  23. header_hcho.append(col_names[idx])
  24. idx=idx+1
Add Comment
Please, Sign In to add comment