How to use the pygmt.exceptions.GMTOSError function in pygmt

To help you get started, we’ve selected a few pygmt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GenericMappingTools / pygmt / pygmt / clib / loading.py View on Github external
if is_64bit is None:
        is_64bit = sys.maxsize > 2 ** 32

    if os_name.startswith("linux"):
        libname = "libgmt.so"
    elif os_name == "darwin":
        # Darwin is macOS
        libname = "libgmt.dylib"
    elif os_name == "win32":
        if is_64bit:
            libname = "gmt_w64.dll"
        else:
            libname = "gmt_w32.dll"
    else:
        raise GMTOSError('Operating system "{}" not supported.'.format(sys.platform))
    return libname