How can I extract a .zip
or .rar
file using Python?
Advertisement
Answer
Late, but I wasn’t satisfied with any of the answers.
JavaScript
x
4
1
pip install patool
2
import patoolib
3
patoolib.extract_archive("foo_bar.rar", outdir="path here")
4
Works on Windows and linux without any other libraries needed.