(option)
return result
Get configuration option from the `geos-config` development utility

    Path to utility is set with a module-level `geos_config` variable, which
    can be changed or unset.
Get configuration option from the `geos-config` development utility
Get configuration option from the geos - config development utility
def get_geos_config(option):
    '''Get configuration option from the `geos-config` development utility

    Path to utility is set with a module-level `geos_config` variable, which
    can be changed or unset.
    '''
    geos_config = globals().get('geos_config')
    if not geos_config or not isinstance(geos_config, str):
        raise OSError('Path to geos-config is not set')
    try:
        stdout, stderr = subprocess.Popen(
            [geos_config, option],
            stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
    except OSError as ex:
        # e.g., [Errno 2] No such file or directory
        raise OSError(
            'Could not find geos-config %r: %s' % (geos_config, ex))
    if stderr and not stdout:
        raise ValueError(stderr.strip())
    if sys.version_info[0] >= 3:
        result = stdout.decode('ascii').strip()
    else:
        result = stdout.strip()
    log.debug('%s %s: %r', geos_config, option, result)
    return result
def get_geos_config ( option ) : geos_config = globals ( ) . get ( 'geos_config' ) if not geos_config or not isinstance ( geos_config , str ) : raise OSError ( 'Path to geos-config is not set' ) try : stdout , stderr = subprocess . Popen ( [ geos_config , option ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) . communicate ( ) except OSError as ex : # e.g., [Errno 2] No such file or directory raise OSError ( 'Could not find geos-config %r: %s' % ( geos_config , ex ) ) if stderr and not stdout : raise ValueError ( stderr . strip ( ) ) if sys . version_info [ 0 ] >= 3 : result = stdout . decode ( 'ascii' ) . strip ( ) else : result = stdout . strip ( ) log . debug ( '%s %s: %r' , geos_config , option , result ) return result