is_remote#

gwpy.io.remote.is_remote(url: str) bool[source]#

Return True if url points at a remote URL.

This function just inspects the ‘scheme’ of the URL, if present, and returns True if the scheme isn’t "file".

On Windows, any url that includes a drive assignment, e.g: "C:\\Users\\me\\data.txt" will return False.

Parameters:
urlstr, pathlib.Path

The URL to inspect.

Returns:
remotebool

True if the URL looks like it is remote (would need a network connection for access), otherwise False.