def _AnsiCmd(command_list):
  if not isinstance(command_list, list):
    raise ValueError('Invalid list: %s' % command_list)
  # Checks that entries are valid SGR names.
  # No checking is done for sequences that are correct but 'nonsensical'.
  for sgr in command_list:
    if sgr.lower() not in SGR:
      raise ValueError('Invalid or unsupported SGR name: %s' % sgr)
  # Convert to numerical strings.
  command_str = [str(SGR[x.lower()]) for x in command_list]
  # Wrap values in Ansi escape sequence (CSI prefix & SGR suffix).
  return '\033[%sm' % (';'.join(command_str))
Get programming language data for project.
dataset/ETHPy150Open google/textfsm/terminal.py/_AnsiCmd--crossover with--dataset/ETHPy150Open ask/python-github2/github2/repositories.py/Repositories.languages