platypush/utils/__init__.py
def find_files_by_ext(directory, *exts):
    """
    Finds all the files in the given directory with the provided extensions
    """

    if not exts:
        raise AttributeError('No extensions provided')

    if not os.path.isdir(directory):
        raise AttributeError('{} is not a valid directory'.format(directory))

    min_len = len(min(exts, key=len))
    max_len = len(max(exts, key=len))
    result = []

    for root, dirs, files in os.walk(directory):
        for i in range(min_len, max_len + 1):
            result += [f for f in files if f[-i:] in exts]

    return result

    Finds all the files in the given directory with the provided extensions
    
Finds all the files in the given directory with the provided extensions
Finds all the files in the given directory with the provided extensions
def find_files_by_ext(directory, *exts):
    if not exts:
        raise AttributeError('No extensions provided')
    if not os.path.isdir(directory):
        raise AttributeError('{} is not a valid directory'.format(directory))
    min_len = len(min(exts, key=len))
    max_len = len(max(exts, key=len))
    result = []
    for root, dirs, files in os.walk(directory):
        for i in range(min_len, max_len + 1):
            result += [f for f in files if f[-i:] in exts]
    return result
def find_files_by_ext ( directory , * exts ) : if not exts : raise AttributeError ( 'No extensions provided' ) if not os . path . isdir ( directory ) : raise AttributeError ( '{} is not a valid directory' . format ( directory ) ) min_len = len ( min ( exts , key = len ) ) max_len = len ( max ( exts , key = len ) ) result = [ ] for root , dirs , files in os . walk ( directory ) : for i in range ( min_len , max_len + 1 ) : result += [ f for f in files if f [ - i : ] in exts ] return result
Finds all the files in the given directory with the provided extensions
Finds all the files in the given directory with the provided extensions
"""
    Finds all the files in the given directory with the provided extensions
    """
directory