extract rar

DFS nospam at dfs.com
Sat Apr 2 03:56:12 EDT 2016


On 4/1/2016 5:01 PM, Jianling Fan wrote:
> Thanks, but the problem is that I am not allowed to install any
> software in my office PC, even free software.
> Normally, I use zip files but this time I need to extract a rar file.
> I don't like to go to IT guys because it takes time.
> That's why I am looking for an alternative way without installing
> other software.
>
>   Thanks,
>
> On 1 April 2016 at 13:37, Albert-Jan Roskam <sjeik_appie at hotmail.com> wrote:
>>
>>
>>
>>> Date: Fri, 1 Apr 2016 13:22:12 -0600
>>> Subject: extract rar
>>> From: fanjianling at gmail.com
>>> To: python-list at python.org
>>>
>>> Hello everyone,
>>>
>>> I am wondering is there any way to extract rar files by python without
>>> WinRAR software?
>>>
>>> I tried Archive() and patool, but seems they required the WinRAR software.
>>
>> Perhaps 7-zip in a Python subprocess:
>> http://superuser.com/questions/458643/unzip-rar-from-command-line-with-7-zip/464128


I'm not experienced with Python, but I found this:

"pip install patool
import patoolib
patoolib.extract_archive("foo_bar.rar", outdir=".")
Works on Windows and linux without any other libraries needed."

http://stackoverflow.com/questions/17614467/how-can-unrar-a-file-with-python





More information about the Python-list mailing list