Zach Riggle added the comment:

Neat, though that's not in the standard library.

The current logic for getting a handle to libc could also be simplified via 
ctypes.util.find_library 
(https://docs.python.org/3/library/ctypes.html#finding-shared-libraries).

Darwin:

    >>> import ctypes.util
    >>> ctypes.util.find_library('c')
    '/usr/lib/libc.dylib'
    
Linux:

    >>> import ctypes.util
    >>> ctypes.util.find_library('c')
    'libc.so.6'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29335>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to