def resource_spec(spec):
    filepath = spec
    if spec.startswith('egg:'):
        req, subpath = spec.split('egg:')[1].split('#')
        req = pkg_resources.get_distribution(req).as_requirement()
        filepath = pkg_resources.resource_filename(req, subpath)
    elif spec.startswith('file:'):
        filepath = spec.split('file:')[1]
    # Other specs could be added, but egg and file should be fine for
    # now
    return filepath
Loads resource from a string specifier. 
dataset/ETHPy150Open SMFOSS/CheesePrism/cheeseprism/utils.py/resource_spec