def split_url_or_path(url_or_path):
 if ('://' in url_or_path):
  return url_or_path.rstrip('/').rsplit('/', 1)
 return osp.split(url_or_path.rstrip(osp.sep))

def split_url_or_path ( url_or_path ) : if ( '://' in url_or_path ) : return url_or_path . rstrip ( '/' ) . rsplit ( '/' , 1 ) return osp . split ( url_or_path . rstrip ( osp . sep ) )
return the latest component of a string containing either an url of the form <scheme>://<path> or a local file system path .