def get_file_path(uri): """Return file path from an uri.""" url = urlsplit(uri) if url.scheme.lower() == "file": return unquote(url.path) return None