def to_printable_string(self):
'''
If this buffer is printable, returns a string version of it. Otherwise fails.
'''
assert self.is_printable(), "Buffer %s is not printable" % self._buf
return ''.join(chr(c) for c in self._buf)
评论列表
文章目录