glymur/config.py
def read_config_file(libname):
    """
    Extract library locations from a configuration file.

    Parameters
    ----------
    libname : str
        One of either 'openjp2' or 'openjpeg'

    Returns
    -------
    path : None or path
        None if no location is specified, otherwise a path to the library
    """
    filename = glymurrc_fname()
    if filename is None:
        # There's no library file path to return in this case.
        return None

    # Read the configuration file for the library location.
    parser = ConfigParser()
    parser.read(filename)
    try:
        path = parser.get('library', libname)
    except (NoOptionError, NoSectionError):
        path = None
    else:
        # Turn it into a pathlib object.
        path = pathlib.Path(path)
    return path

    Extract library locations from a configuration file.

    Parameters
    ----------
    libname : str
        One of either 'openjp2' or 'openjpeg'

    Returns
    -------
    path : None or path
        None if no location is specified, otherwise a path to the library
    
Extract library locations from a configuration file.
Parameters

libname : str
One of either 'openjp2' or 'openjpeg'

Returns

path : None or path
None if no location is specified, otherwise a path to the library
Extract library locations from a configuration file . Parameters libname : str One of either ' openjp2 ' or ' openjpeg ' Returns path : None or path None if no location is specified otherwise a path to the library
def read_config_file(libname):
    filename = glymurrc_fname()
    if filename is None:
        return None
    parser = ConfigParser()
    parser.read(filename)
    try:
        path = parser.get('library', libname)
    except (NoOptionError, NoSectionError):
        path = None
    else:
        path = pathlib.Path(path)
    return path
def read_config_file ( libname ) : filename = glymurrc_fname ( ) if filename is None : return None parser = ConfigParser ( ) parser . read ( filename ) try : path = parser . get ( 'library' , libname ) except ( NoOptionError , NoSectionError ) : path = None else : path = pathlib . Path ( path ) return path
Extract library locations from a configuration file.
Extract library locations from a configuration file .
"""
    Extract library locations from a configuration file.

    Parameters
    ----------
    libname : str
        One of either 'openjp2' or 'openjpeg'

    Returns
    -------
    path : None or path
        None if no location is specified, otherwise a path to the library
    """ # There's no library file path to return in this case. # Read the configuration file for the library location. # Turn it into a pathlib object.
libname