def getImports(pth):
 if (is_win or is_cygwin):
  if pth.lower().endswith('.manifest'):
   return []
  try:
   return _getImports_pe(pth)
  except Exception as exception:
   logger.warn('Can not get binary dependencies for file: %s', pth, exc_info=1)
   return []
 elif is_darwin:
  return _getImports_macholib(pth)
 else:
  return _getImports_ldd(pth)

def getImports ( pth ) : if ( is_win or is_cygwin ) : if pth . lower ( ) . endswith ( '.manifest' ) : return [ ] try : return _getImports_pe ( pth ) except Exception as exception : logger . warn ( 'Can not get binary dependencies for file: %s' , pth , exc_info = 1 ) return [ ] elif is_darwin : return _getImports_macholib ( pth ) else : return _getImports_ldd ( pth )
forwards to the correct getimports implementation for the platform .