Compute the visible length of the string when printed.

def _printed_len(some_string):
  """Compute the visible length of the string when printed."""
  return len([x for  x in ANSI_ESC_RE.sub('', some_string)
              if x in string.printable])