def _find_library(lib, path):
 for d in path[::(-1)]:
  real_lib = os.path.join(d, lib)
  if os.path.exists(real_lib):
   return real_lib

def _find_library ( lib , path ) : for d in path [ : : ( - 1 ) ] : real_lib = os . path . join ( d , lib ) if os . path . exists ( real_lib ) : return real_lib
find a library .