复制代码 代码如下:def find_file_by_pattern(pattern=’.*’, base=”.”, circle=True): ””’查找给定文件夹下面所有 ”’ re_file = re.compile(pattern) if base == “.”: base = os.getcwd() final_file_list = [] print base cur_list = os.listdir(base) for item in cur_list: if item == “.svn”: continue full_path = os.path.join(base, ite