def find_library(name, cached=True, internal=True):
 if (not cached):
  return cdll.LoadLibrary(_so_mapping[name])
 if internal:
  if (name not in _internal):
   _internal[name] = cdll.LoadLibrary(_so_mapping[name])
  return _internal[name]
 return getattr(cdll, _so_mapping[name])

def find_library ( name , cached = True , internal = True ) : if ( not cached ) : return cdll . LoadLibrary ( _so_mapping [ name ] ) if internal : if ( name not in _internal ) : _internal [ name ] = cdll . LoadLibrary ( _so_mapping [ name ] ) return _internal [ name ] return getattr ( cdll , _so_mapping [ name ] )
cached: return a new instance internal: return a shared instance thats not the ctypes cached one .