code: def printable(data):
          
          result = ''
          for c in data:
              if 32 < ord(c) < 128:
                  result += c
              else:
                  result += '.'
          return result
docs: Replace unprintable characters with dots.
  
          @type  data: str
          @param data: Binary data.
  
          @rtype:  str
          @return: Printable text.