python使用内存zipfile对象在内存中打包文件示例

qweertweer 21 0 PDF 2020-12-31 18:12:18

复制代码 代码如下:import zipfileimport StringIO class InMemoryZip(object): def __init__(self): # Create the in-memory file-like object self.in_memory_zip = StringIO.StringIO() def append(self, filename_in_zip, file_contents): ”’Appends a file with name filename_in_zip and content

用户评论
请输入评论内容
评分:
暂无评论