#NEWLINE# def findall( dir , pattern = '*' ) : #NEWLINE# #INDENT# "A better finder for 'data_files'" #NEWLINE# all_files = [ ] #NEWLINE# for ( root , dirs , files ) in os . walk ( dir ) : #NEWLINE# #INDENT# if ( len ( files ) > 0 ) : #NEWLINE# #INDENT# file_list = [ ] #NEWLINE# for file in fnmatch . filter ( files , pattern ) : #NEWLINE# #INDENT# file_path = os . path . join ( root , file ) #NEWLINE# file_list . extend ( ( file_path , ) ) #NEWLINE# #UNINDENT# all_files . extend ( ( ( root , file_list ) , ) ) #NEWLINE# #UNINDENT# #UNINDENT# return all_files