(data)
return result
Replace unprintable characters with dots.

        @type  data: str
        @param data: Binary data.

        @rtype:  str
        @return: Printable text.
Replace unprintable characters with dots.
Replace unprintable characters with dots .
def printable(data):
        """
        Replace unprintable characters with dots.

        @type  data: str
        @param data: Binary data.

        @rtype:  str
        @return: Printable text.
        """
        result = ''
        for c in data:
            if 32 < ord(c) < 128:
                result += c
            else:
                result += '.'
        return result
def printable ( data ) : result = '' for c in data : if 32 < ord ( c ) < 128 : result += c else : result += '.' return result