How can unrar a file with python

前端 未结 5 1236
一生所求
一生所求 2020-11-30 10:48

I can to unzip a file if file is a .zip and unrar file if my file type is .rar. How i can do this work with python 2.7?

5条回答
  •  一生所求
    2020-11-30 11:37

    Try the pyunpack package:

    from pyunpack import Archive
    Archive('a.zip').extractall('/path/to')
    

提交回复
热议问题