docs: def isprintable(string):
      """Return if all characters in string are printable.
  
      >>> isprintable('abc')
      True
      >>> isprintable(b'\01')
      False
  
      """
      string = string.strip()
      if not string:
          return True
      if sys.version_info[0] == 3:
          try:
              return string.isprintable()
          except Exception:
              pass
          try:
              return string.decode('utf-8').isprintable()
          except Exception:
              pass
      else:
          if string.isalnum():
              return True
          printable = ('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST'
                       'UVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c')
          return all(c in printable for c in string)