def uri_to_path(uri):
 if isinstance(uri, compat.text_type):
  uri = uri.encode(u'utf-8')
 return urllib.parse.unquote(urllib.parse.urlsplit(uri).path)

def uri_to_path ( uri ) : if isinstance ( uri , compat . text_type ) : uri = uri . encode ( u'utf-8' ) return urllib . parse . unquote ( urllib . parse . urlsplit ( uri ) . path )
convert an uri to a os specific path .