(pattern, **kwargs)
return resource
Wrapper for resource_string.
Wrapper for resource_string.
Wrapper for resource_string .
def get_data(pattern, **kwargs):
    """Wrapper for resource_string."""
    name = pattern.format(**kwargs)
    try:
        # this should return None if not available, I thought, but it doesn't
        resource = pkg_resources.resource_string(__name__, name)
    except EnvironmentError:
        raise ResourceFailed(name)
    if resource is None:
        raise ResourceFailed(name)
    return resource
def get_data ( pattern , * * kwargs ) : name = pattern . format ( * * kwargs ) try : # this should return None if not available, I thought, but it doesn't resource = pkg_resources . resource_string ( __name__ , name ) except EnvironmentError : raise ResourceFailed ( name ) if resource is None : raise ResourceFailed ( name ) return resource