Retrieving Files from a ZIP File : Zip file : File PYTHON TUTORIALS


PYTHON TUTORIALS » File » Zip file »

 

Retrieving Files from a ZIP File


import os
import zipfile


tFile = zipfile.ZipFile("files.zip"'r')

print tFile.getinfo("input.txt")

buffer = tFile.read("ren_file.py")
print buffer

f = open("extract.txt""w")
f.write(buffer)
f.close()

tFile.close()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo File
» Zip file