def write_handle(self, handle):
"""
Write the database to the specified file handle.
"""
if self.compress and _gzip_ok:
try:
g = gzip.GzipFile(mode="wb", fileobj=handle)
except:
g = handle
else:
g = handle
self.g = codecs.getwriter("utf8")(g)
self.write_xml_data()
g.close()
return 1
评论列表
文章目录