diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index 35b0b1e50e9..e2a31c8fdb2 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -198,7 +198,7 @@ elif os.name == "posix": expr = r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)' \ % (abi_type, re.escape(name)) res = re.search(expr, - os.popen('/sbin/ldconfig -p 2>/dev/null').read()) + os.popen('LANG=C /sbin/ldconfig -p 2>/dev/null').read()) if not res: return None return res.group(1) diff --git a/Misc/NEWS b/Misc/NEWS index e5144569c79..b0c59011b03 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -15,6 +15,9 @@ Core and Builtins Library ------- +- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of + the locale. + What's New in Python 2.6.5? ===========================