def ended(self) -> bool:
try:
fileno = self._codeio.fileno()
offset = os.fstat(fileno).st_size
except io.UnsupportedOperation:
old_offset = self.offset
self._codeio.seek(0, io.SEEK_END)
offset = self._codeio.tell()
self._codeio.seek(old_offset)
return self.offset == offset
评论列表
文章目录