Michael Felt added the comment: Considering that python-2.7.13 is posed for a release - I ask again, considering that python-2.7.12 (and I expect a few earlier ones) can load "AIX" .a type shared libraries - if you know how to supply the name -
that my patch be included in python-2.7.13. michael@x071:[/data/prj/python]-2.7.12.0/Lib/ctypes/util.py < --- python-2.7.12/Lib/ctypes/util.py 2016-06-25 21:49:30 +0000 +++ python-2.7.12.0/Lib/ctypes/util.py 2016-12-02 10:12:01 +0000 @@ -262,6 +262,10 @@ print cdll.LoadLibrary("libcrypto.dylib") print cdll.LoadLibrary("libSystem.dylib") print cdll.LoadLibrary("System.framework/System") + if sys.platform == "aix5": + from ctypes import CDLL + RTLD_MEMBER = 0x00040000 + print CDLL("libc.a(shr_64.o)", RTLD_MEMBER) else: print cdll.LoadLibrary("libm.so") print cdll.LoadLibrary("libcrypt.so") And the result is: root@x064:[/data/prj/python/python-2.7.12.0/Lib/ctypes]../../python util.py None None None <CDLL 'libc.a(shr_64.o)', handle e at 70000000013ae10> In, other words, as is, find_library() will always return None for standard libraries (will only return a value if "root" has extracted and renamed a shared library member as a file) - while, if you know the magic that find_library cannot return - you can load such a library. IMVHO (in my Very humble opinion) - a bug that has been too long unnoticed - but can be repaired. There is no additional ability being added - it is already there. Just making it more accessible and legible for python programmers on AIX. If the patch-code needs more cleanup, improvement, etc. - fine. But do not lock out an easy interface to such a basic function. regards, Michael ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27435> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com