I am trying to extract a zipped folder but instead of directly using .extractall(), I want to extract the file into stream so that I can handle the stream myself. Is it possible to do it using tarfile? Or is there any suggestions?
I am trying to extract a zipped folder but instead of directly using .extractall()
Share
You can obtain each file from a tar file as a python
fileobject using the.extractfile()method. Loop over thetarfile.TarFile()instance to list all entries: