[Python-checkins] cpython: Remove unused private function

antoine.pitrou python-checkins at python.org
Sat Apr 23 17:56:25 CEST 2011


http://hg.python.org/cpython/rev/020ebe0be33e
changeset:   69534:020ebe0be33e
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Apr 23 17:56:06 2011 +0200
summary:
  Remove unused private function

files:
  Lib/ctypes/util.py |  16 ----------------
  1 files changed, 0 insertions(+), 16 deletions(-)


diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -172,22 +172,6 @@
 
     else:
 
-        def _findLib_ldconfig(name):
-            # XXX assuming GLIBC's ldconfig (with option -p)
-            expr = r'/[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
-            with contextlib.closing(os.popen('/sbin/ldconfig -p 2>/dev/null')) as f:
-                data = f.read()
-            res = re.search(expr, data)
-            if not res:
-                # Hm, this works only for libs needed by the python executable.
-                cmd = 'ldd %s 2>/dev/null' % sys.executable
-                with contextlib.closing(os.popen(cmd)) as f:
-                    data = f.read()
-                res = re.search(expr, data)
-                if not res:
-                    return None
-            return res.group(0)
-
         def _findSoname_ldconfig(name):
             import struct
             if struct.calcsize('l') == 4:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list