def _static_folder_path(static_url, static_folder, static_asset, prefix=''):
    """ 
    Returns a path to a file based on the static folder, and not on the 
    filesystem holding the file.

    Returns a path relative to static_url for static_asset
    """
    if not static_asset.startswith(static_folder):
        raise ValueError('%s startic asset must be under %s static folder' %
            (static_asset, static_folder))
    rel_asset = static_asset[len(static_folder):]
    key = u'%s/%s' % (static_url.rstrip('/'), rel_asset.lstrip('/'))
    if prefix:
        key = u'%s/%s' % (prefix, key)
    return key
