parameters: (platform)
docstring: Library-based interposition will fail silently if SIP is enabled,
      so this should be detected. You can detect whether SIP is enabled on
      Darwin by checking whether (1) there is a binary called 'csrutil' in
      the path and, if so, (2) whether the output of executing 'csrutil status'
      contains 'System Integrity Protection status: enabled'.
  
      :param platform: name of the platform (returned by sys.platform),
      :return: True if library preload will fail by the dynamic linker.
docstring_summary: Library-based interposition will fail silently if SIP is enabled,
      so this should be detected. You can detect whether SIP is enabled on
      Darwin by checking whether (1) there is a binary called 'csrutil' in
      the path and, if so, (2) whether the output of executing 'csrutil status'
      contains 'System Integrity Protection status: enabled'.
docstring_tokens: Library - based interposition will fail silently if SIP is enabled so this should be detected . You can detect whether SIP is enabled on Darwin by checking whether ( 1 ) there is a binary called csrutil in the path and if so ( 2 ) whether the output of executing csrutil status contains System Integrity Protection status : enabled .
function: def is_preload_disabled(platform):
      """ Library-based interposition will fail silently if SIP is enabled,
      so this should be detected. You can detect whether SIP is enabled on
      Darwin by checking whether (1) there is a binary called 'csrutil' in
      the path and, if so, (2) whether the output of executing 'csrutil status'
      contains 'System Integrity Protection status: enabled'.
  
      :param platform: name of the platform (returned by sys.platform),
      :return: True if library preload will fail by the dynamic linker. """
  
      if platform in WRAPPER_ONLY_PLATFORMS:
          return True
      elif platform == 'darwin':
          command = ['csrutil', 'status']
          pattern = re.compile(r'System Integrity Protection status:\s+enabled')
          try:
              return any(pattern.match(line) for line in run_command(command))
          except:
              return False
      else:
          return False
function_tokens: def is_preload_disabled ( platform ) : if platform in WRAPPER_ONLY_PLATFORMS : return True elif platform == 'darwin' : command = [ 'csrutil' , 'status' ] pattern = re . compile ( r'System Integrity Protection status:\s+enabled' ) try : return any ( pattern . match ( line ) for line in run_command ( command ) ) except : return False else : return False