复制代码 代码如下: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