python-遍历目录
os.walk
1 | import os |
查找指定文件
glob.glob
1 | import glob |
fnmatch.fnmatch
1 | import fnmatch |
re.match
1 | for d in [f for f in os.listdir('.') if re.match(r'build-\(.*\)-.*', f)]: |
1 | import os |
1 | import glob |
1 | import fnmatch |
1 | for d in [f for f in os.listdir('.') if re.match(r'build-\(.*\)-.*', f)]: |