def write(self, stream, seekfirst=True):
"""Write header and child elements.
This checks first whether the Element is in a consistent state.
Args:
+ stream: As in Element.write().
+ seekfirst: As in Element.write().
Raises:
+ EbmlException, if the write fails.
+ Inconsistent, if the Element is not in a consistent state.
"""
self.check_consistency()
if seekfirst:
stream.seek(self.pos_absolute, SEEK_SET)
stream.write(self.header.encode())
Container._write(self, stream, False)
评论列表
文章目录