def search_file(dir_path, name): for p in os.listdir(dir_path): fp = os.path.join(dir_path, p) if os.path.isdir(fp): search_file(fp, name) elif os.path.isfile(fp) and name in p: print('匹配到文件:%s' % fp)
Sign in to make a reply
倔强的leter