import glob, os
def all_files(pattern, search_path, pathsep = os.pathsep):
for path in search_path.split(pathsep):
for match in glob.glob(os.path.join(path, pattern)):
yield match
aaa=all_files('4_*', r"E:\git_project\mouse_detect_demo\mouse_data\mouse_picp")
# print(all_files('*.s', r"E:\git_project\mouse_detect_demo\mouse_data\mouse_picp").__next__())
for match in aaa:
print(match)