def emit_text(self, text):
"""Emit straight text to the file"""
if self.timeout is not None:
if select.select([],[self.handle],[], self.timeout) == ([],[],[]):
raise IOError("Timed out waiting for write")
self.handle.write(
"\x1e%s\n" % (text.translate(string.maketrans('', ''), "\n"))
)
self.handle.flush()
评论列表
文章目录