def compileTools(self):
    if '--compile-tools' in sys.argv or '-ct' in sys.argv:
      try: index = sys.argv.index('--compile-tools')
      except: index = sys.argv.index('-ct')

      # Get the name of the file with the tool list.
      try: compileList = sys.argv[index + 1]
      except: self.error.missingCompileList(dest=sys.stdout)

      # Attempt to open the list.
      try: compileFile = open(compileList)
      except: self.error.missingCompileListFile(compileList, dest=sys.stdout)

      # Put the tools in the toolsToSkip list and strip off the end of line.
      toolsToCompile = compileFile.readlines()
      toolsToCompile = [tool.rstrip('\n') for tool in toolsToCompile]
      compileFile.close()

      # Set up the list of available tools.
      availableTools = []
      for tool in conf.tools: availableTools.append(tool.name)

      # Check that all of the tools are valid tools in gkno.
      for tool in toolsToCompile:
        if tool not in availableTools: self.error.invalidToolToCompile(compileList, tool, availableTools, dest=sys.stdout)

      # Check for dependencies. Some tools cannot be compiled without the presence of other
      # tools. If a tool has not been listed, but a prerequisite tool has, terminate.
      # TODO CHECK DEPENDENCY

      # Remove the tools in the toolsToSkip list from conf.tools.
      for counter, tool in reversed(list(enumerate(conf.tools))):
        if tool.name not in toolsToCompile: del(conf.tools[counter])

  # "gkno version" 
  # 
  # gkno version is output already, by main script. Here we will create links 
  # that point users to the built-in tool repos, at the specific commit used
  # by gkno. Additional information about each tool (e.g. version, features )
  # should be available from its documentation or contacting its authors.
dataset/ETHPy150Open gkno/gkno_launcher/src/gkno/adminUtils.py/adminUtils.compileTools/original