def showVersion(self):

    # Run 'git submodule' to print out all submodule info.
    process = subprocess.Popen(["git", "submodule"], stdout=subprocess.PIPE)
    (output, err) = process.communicate()
    exit_code = process.wait()
    if exit_code != 0:
      print("Could not retrieve tool version data: " + err, end="\n", file=sys.stdout)
      return False

    # Fetch info for tools only.
    submodules = {}
    for line in output.splitlines():
      fields = line.split()
      commit = fields[0]
      fullName = fields[1]
      if fullName.startswith("tools/"):
        name = fullName[6:]    
        submodules[name] = commit

    # Determine longest tool name (for clean formatting).
    toolNames = sorted(submodules.keys(), key=lambda s: s.lower())
    maxNameLength = 0
    for toolName in toolNames:
      if len(toolName) > maxNameLength:
        maxNameLength = len(toolName)

    # Print results.
    print("", end="\n", file=sys.stdout)
    print("Listed below are the built-in software tools provided by gkno. Follow the URLs", end="\n", file=sys.stdout)
    print("provided to access the specific version of each tool used in this version of gkno.", end="\n", file=sys.stdout)
    print("", end="\n", file=sys.stdout)

    toolHeader = "Tool"
    underline  = '-'*maxNameLength
    print(toolHeader.ljust(maxNameLength) + "\t" + "URL",     end="\n", file=sys.stdout)
    print(underline.ljust(maxNameLength)  + "\t" + underline, end="\n", file=sys.stdout)

    for toolName in toolNames:
      url = "https://github.com/gkno/" + toolName + "/tree/" + submodules[toolName]
      print(toolName.ljust(maxNameLength) + "\t" + url, end="\n", file=sys.stdout)
    
    # Return success.
    return True

  # Update-light updates the gkno code and configuration files, but does not update
  # any of the tools or resources.
dataset/ETHPy150Open gkno/gkno_launcher/src/gkno/adminUtils.py/adminUtils.showVersion/original