0

I want to unzip a archive file in a special directory. i use subprocess as below :

import subprocess
INPUT_FILE = "../DEV-TESTSTATION/tmp/DLL_LOGFILE-G1R0C0.zip"
OUTPUT = "../DEV-TESTSTATION/work/LOGFILE"

subprocess.call(['7z', 'x', INPUT_FILE ,' -o'+OUTPUT ])

Output :

No files to process
Everything is Ok

Files: 0
Size:       0
Compressed: 2013846

1 Answers1

0

You can try py7xr library.

Example:

import py7zr 

with py7zr.SevenZipFile('abc.7z', mode='r', password='secret') as 7z: 

  7z.extractall() 
Jimmy
  • 147
  • 1
  • 11