python自定义文件查找函数,python自定义函数,import osimp


import osimport threadfrom fnmatch import fnmatchdef finds(startpath,files):    try:        for i in os.listdir(startpath):            if fnmatch(i,files) == True:                print os.path.join(startpath,i)            elif os.path.isdir(os.path.join(startpath,i)) == True:                thread.start_new_thread(finds, (os.path.join(startpath,i),files))            else:                pass    except:        pass

评论关闭