parameters: ()
return_statement: return SearchForNaCl(script_file)
docstring: Find the native_client path, relative to this script.
        This script is in ppapi/... and native_client is a sibling of ppapi.
docstring_summary: Find the native_client path, relative to this script.
        This script is in ppapi/... and native_client is a sibling of ppapi.
docstring_tokens: Find the native_client path relative to this script . This script is in ppapi / ... and native_client is a sibling of ppapi .
function: def GetNaClRoot():
    """ Find the native_client path, relative to this script.
        This script is in ppapi/... and native_client is a sibling of ppapi.
    """
    script_file = os.path.abspath(__file__)
    def SearchForNaCl(cur_dir):
      if cur_dir.endswith('ppapi'):
        parent = os.path.dirname(cur_dir)
        sibling = os.path.join(parent, 'native_client')
        if not os.path.isdir(sibling):
          raise Exception('Could not find native_client relative to %s' %
                          script_file)
        return sibling
      # Detect when we've the root (linux is /, but windows is not...)
      next_dir = os.path.dirname(cur_dir)
      if cur_dir == next_dir:
        raise Exception('Could not find native_client relative to %s' %
                        script_file)
      return SearchForNaCl(next_dir)
  
    return SearchForNaCl(script_file)
function_tokens: def GetNaClRoot ( ) : script_file = os . path . abspath ( __file__ ) def SearchForNaCl ( cur_dir ) : if cur_dir . endswith ( 'ppapi' ) : parent = os . path . dirname ( cur_dir ) sibling = os . path . join ( parent , 'native_client' ) if not os . path . isdir ( sibling ) : raise Exception ( 'Could not find native_client relative to %s' % script_file ) return sibling # Detect when we've the root (linux is /, but windows is not...) next_dir = os . path . dirname ( cur_dir ) if cur_dir == next_dir : raise Exception ( 'Could not find native_client relative to %s' % script_file ) return SearchForNaCl ( next_dir ) return SearchForNaCl ( script_file )