0

I have a .tar.7z file which I want to unpack (when I unpack with archive_utility.app on MAC manually, I am getting a folder with subfolder and files). I am not able to unpack this .tar.7z file with Python. Please let me know which module will let me do so.

i tried this using tarfile like below and failed to open it.

import tarfile

# open file
# file = tarfile.open('ckrseoselr7202-logs.tar.gz')  # Working
file = tarfile.open('ckrseoselr7202-logs.tar.7z')  # Not Working

# extracting file
file.extractall('./Folder')
  
file.close()

Same way i need to open .tar.7z file and want to read one particular file to parse the data. Let me know how i can achieve this using python3.

SAGY
  • 67
  • 7
  • Does this answer your question? [How to read contents of 7z file using python](https://stackoverflow.com/questions/32797851/how-to-read-contents-of-7z-file-using-python) – jtlz2 Apr 28 '22 at 09:00
  • For python3, see e.g. https://stackoverflow.com/a/63012687/1021819 in the above Q – jtlz2 Apr 28 '22 at 09:01

0 Answers0