def terminal_format(args):
  """
  args is a list of tuples and returns one string line.
  2-tuples are "{x[1]}".format(x[0]) i.e. value, format
  3-tuples are "{}={x[2]}".format(x[0],x[1]) i.e. label, value, format
  """
  line = ""
  for x in args:
    if len(x) == 3:
      line += ("{}={"+str(x[2])+"}").format(str(x[0]), x[1])
    elif len(x) == 2:
      line += ("{"+str(x[1])+"}").format(x[0])
    line += " "
  return line