From: Matthias Klose Date: Mon, 15 Mar 2010 13:42:23 +0000 (+0000) Subject: - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of X-Git-Tag: v2.7b1~349 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=358e7ff36b60ee933fbd913a8da9a9b55f8a90c9;p=python - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the locale. --- diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index 8f6e3384db..adde30798c 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -185,7 +185,7 @@ elif os.name == "posix": def _findLib_ldconfig(name): # XXX assuming GLIBC's ldconfig (with option -p) expr = r'/[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) - f = os.popen('/sbin/ldconfig -p 2>/dev/null') + f = os.popen('LANG=C /sbin/ldconfig -p 2>/dev/null') try: data = f.read() finally: diff --git a/Misc/NEWS b/Misc/NEWS index 7c357a1f1b..20959bbce1 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -20,6 +20,9 @@ Core and Builtins Library ------- +- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of + the locale. + - Issue #7774: Set sys.executable to an empty string if ``argv[0]`` has been set to an non existent program name and Python is unable to retrieve the real program name.