(path, search_strings, files_extensions=None, max_size=None)
search recursively for a string in all files in the path
search recursively for a string in all files in the path
search recursively for a string in all files in the path
def search_path(path, search_strings, files_extensions=None, max_size=None):
	""" search recursively for a string in all files in the path """
	if not files_extensions:
		files_extensions=None
	if files_extensions is not None:
		files_extensions=tuple(files_extensions)
	for root, dirs, files in os.walk(path):
		for f in files:
			if files_extensions is None or f.lower().endswith(files_extensions):
				if max_size is None or os.path.getsize(os.path.join(root,f))<max_size:
					for res in search_file(os.path.join(root,f),search_strings):
						yield (os.path.join(root,f), res[0], res[1])
def search_path ( path , search_strings , files_extensions = None , max_size = None ) : if not files_extensions : files_extensions = None if files_extensions is not None : files_extensions = tuple ( files_extensions ) for root , dirs , files in os . walk ( path ) : for f in files : if files_extensions is None or f . lower ( ) . endswith ( files_extensions ) : if max_size is None or os . path . getsize ( os . path . join ( root , f ) ) < max_size : for res in search_file ( os . path . join ( root , f ) , search_strings ) : yield ( os . path . join ( root , f ) , res [ 0 ] , res [ 1 ] )