def is_printable(self): ''' Returns True if all the characters in the buffer are ASCII printable characters. ''' return all((0 <= c <= 255) for c in self._buf)