ctypes
dynamically loads the shared object or the DLL, so you need some how the shared object name. You may have a look at ctypes.util.find_library(name)
. For example:
>>> from ctypes.util import find_library
>>>
>>> find_library('pthread')
'libpthread.so.0'
>>>
>>> find_library('ssl')
'libssl.so.0.9.8'
>>>
>>> find_library('png')
'libpng12.so.0'
>>>