# DP: Try harder on issue #7356: ctypes.util: Make parsing of ldconfig output # DP: independent of the locale. Set LC_ALL=C too. --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -198,7 +198,7 @@ expr = r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)' \ % (abi_type, re.escape(name)) res = re.search(expr, - os.popen('LANG=C /sbin/ldconfig -p 2>/dev/null').read()) + os.popen('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null').read()) if not res: return None return res.group(1)