Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

extract rar

68 views
Skip to first unread message

Jianling Fan

unread,
Apr 1, 2016, 3:22:35 PM4/1/16
to
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.

Thanks,

Regards,

Jianling

Random832

unread,
Apr 1, 2016, 3:30:12 PM4/1/16
to
On Fri, Apr 1, 2016, at 15:22, Jianling Fan wrote:
> 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.

Rar is a proprietary format. They do distribute a free "unrar" program
for multiple platforms.

Albert-Jan Roskam

unread,
Apr 1, 2016, 3:38:38 PM4/1/16
to


> Date: Fri, 1 Apr 2016 13:22:12 -0600
> Subject: extract rar
> From: fanji...@gmail.com
> To: pytho...@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

Jianling Fan

unread,
Apr 1, 2016, 5:01:46 PM4/1/16
to
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,
--
Jianling Fan
樊建凌

DFS

unread,
Apr 2, 2016, 3:56:33 AM4/2/16
to
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


0 new messages