Message264998
I cannot comment on uuid directly, but for me, this is yet another example of how assumptions can break things.
imho - if you know the exact version of s shared library that you want, calling cdll directly should be find. Maybe find_library is historic.
However, an advantage to calling find_library is that it should lead to an OSError if it cannot be loaded. But trapping OSError on a call to ctypes.cdll or testing for None (NULL) from find_library() is the option of a developer using the ctypes interface.
As far as libFOO.so.N - do you always want to assume it is going to be version N, or are you expecting to be able to work work version N+X?
Again, find_library() can give you the library name it would load - but a programmer must be aware of the platform differences (e.g., AIX returns not a filename, but a libFOO.a(libFOO.so.N) - as just one example.
p.s. as far as ldconfig being part of the problem on AIX (as it does not exist and can lead to OSError or just long delays, I have worked out a (pending) patch for ctypes/util (and ctypes/cdll) that may address the issues with uuid import on AIX. (see issue26439 for the patch) |
|
Date |
User |
Action |
Args |
2016-05-06 17:10:38 | Michael.Felt | set | recipients:
+ Michael.Felt, orsenthil, kdart, pitrou, christian.heimes, eric.araujo, Arfrever, r.david.murray, nvetoshkin, knny-myer, nailor, Keith.Dart, hynek, martin.panter, serhiy.storchaka |
2016-05-06 17:10:37 | Michael.Felt | set | messageid: <1462554637.88.0.234726454658.issue11063@psf.upfronthosting.co.za> |
2016-05-06 17:10:37 | Michael.Felt | link | issue11063 messages |
2016-05-06 17:10:37 | Michael.Felt | create | |
|