标签:class tps file span import https dir for roo
转载自:https://www.cnblogs.com/weiok/p/4872119.html
import os import fnmatch def iterfindfiles(path, fnexp): for root, dirs, files in os.walk(path): for filename in fnmatch.filter(files, fnexp): yield os.path.join(root, filename) for file_path in iterfindfiles(r"1121", "*.jpg"): print(file_path)
find <path> -name "*.jpg" #找path下的所有jpg文件
标签:class tps file span import https dir for roo
原文地址:https://www.cnblogs.com/walter-xh/p/10555561.html