Frage

Here How can unrar a file with python we can see that some modules can be useful for extracting .rar files. But it seems that :

  • rarfile module needs unrar.dll

  • pyunpack also needs some others things (patool ?)

Is there a crossplatform module that doesn't need any external module/.dll that can extract .rar files ?

War es hilfreich?

Lösung

No. The RAR archive format is a bit odd in the sense that it has never got wide adoption. For archive formats like ZIP and GZIP, you have native support almost anywhere. RAR has always been the odd one out.

My suggestion is to create helper code which tries to load both modules and which prints a nice error message when both fail explaining to the user what she can do to fix the problem.

For Linux: "Use you distribution's package manager to install the command-line tool 'rar' or 'unrar'."

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top