glymur/config.py
def glymur_config():
    """
    Try to ascertain locations of openjp2 library.

    Returns
    -------
    tuple
        tuple of library handles
    """
    libname = 'openjp2'
    path = _determine_full_path(libname)

    if path is None or path in ['None', 'none']:
        # Either could not find a library via ctypes or
        # user-configuration-file, or we could not find it in any of the
        # default locations, or possibly the user intentionally does not want
        # one of the libraries to load.
        return None

    loader = ctypes.windll.LoadLibrary if os.name == 'nt' else ctypes.CDLL
    try:
        opj_lib = loader(path)
    except TypeError:
        # This can happen on Windows.  Apparently ctypes.windll.LoadLibrary
        # is no longer taking a WindowsPath
        path = str(path)
        opj_lib = loader(path)
    except OSError:
        msg = f'The {libname} library at {path} could not be loaded.'
        warnings.warn(msg, UserWarning)
        opj_lib = None

    return opj_lib

    Try to ascertain locations of openjp2 library.

    Returns
    -------
    tuple
        tuple of library handles
    
Try to ascertain locations of openjp2 library.
Returns

tuple
tuple of library handles
Try to ascertain locations of openjp2 library . Returns tuple tuple of library handles
def glymur_config():
    libname = 'openjp2'
    path = _determine_full_path(libname)
    if path is None or path in ['None', 'none']:
        return None
    loader = ctypes.windll.LoadLibrary if os.name == 'nt' else ctypes.CDLL
    try:
        opj_lib = loader(path)
    except TypeError:
        path = str(path)
        opj_lib = loader(path)
    except OSError:
        msg = f'The {libname} library at {path} could not be loaded.'
        warnings.warn(msg, UserWarning)
        opj_lib = None
    return opj_lib
def glymur_config ( ) : libname = 'openjp2' path = _determine_full_path ( libname ) if path is None or path in [ 'None' , 'none' ] : return None loader = ctypes . windll . LoadLibrary if os . name == 'nt' else ctypes . CDLL try : opj_lib = loader ( path ) except TypeError : path = str ( path ) opj_lib = loader ( path ) except OSError : msg = f'The {libname} library at {path} could not be loaded.' warnings . warn ( msg , UserWarning ) opj_lib = None return opj_lib
Try to ascertain locations of openjp2 library.
Try to ascertain locations of openjp2 library .
"""
    Try to ascertain locations of openjp2 library.

    Returns
    -------
    tuple
        tuple of library handles
    """ # Either could not find a library via ctypes or # user-configuration-file, or we could not find it in any of the # default locations, or possibly the user intentionally does not want # one of the libraries to load. # This can happen on Windows.  Apparently ctypes.windll.LoadLibrary # is no longer taking a WindowsPath