I have a very large zip file, which is divided into several parts as divided archives with one file in the archive. I don’t have enough resources to combine these archives together or extract them (the source text file is almost 1 TB).
I would like to parse a text file line by line, ideally using something like this:
import zipfile for zipfilename in filenames: with zipfile.ZipFile(zipfilename) as z: with z.open(...) as f: for line in f: print line
Is it possible? If so, how can I read the text file:
Thank you in advance for your help.
I will make a punch.
zip " " Zip , zipfile Python, unzip.
unzip
, , zip, split , Python.
split
"-" , seek() read() (, , ), .
seek() , zip , ( ) () , .
read() , , .
, , ZipFile, "virtual zip".