import re
import fnmatch


def is_supported(klass, file_path):
    """Evaluates if a file is compatible with a given Script class"""

    for ext in klass.supported_format:
        if re.match(fnmatch.translate(ext), file_path):
            return True
    return False