def get_glibc_version():
    """
    Returns:
        Version as a pair of ints (major, minor) or None
    """
    # TODO: Look into a nicer way to get the version
    try:
        out = subprocess.Popen(['ldd', '--version'],
                               stdout=subprocess.PIPE).communicate()[0]
    except OSError:
        return
    match = re.search('([0-9]+)\.([0-9]+)\.?[0-9]*', out)
    try:
        return map(int, match.groups())
    except AttributeError:
        return
def get_glibc_version ( ) : try : out = subprocess . Popen ( [ 'ldd' , '--version' ] , stdout = subprocess . PIPE ) . communicate ( ) [ 0 ] except OSError : return match = re . search ( '([0-9]+)\.([0-9]+)\.?[0-9]*' , out ) try : return map ( int , match . groups ( ) ) except AttributeError : return
Returns:
        Version as a pair of ints (major, minor) or None