Loki
Loki

Reputation: 6261

Is there a Python package similar to Perl's Archive::Extract?

I'm looking for a package that will automatically detect the type of and extract an archive (zip, tar.gz, etc). In Perl, this is easy - in Python, I can't find any simple package/class to do it...

Upvotes: 3

Views: 298

Answers (2)

jathanism
jathanism

Reputation: 33716

Riding off of Mark Byers' response, perhaps you can tie all of these together with mimetypes (also from the standard library). You could identify the type of file, and process it accordingly. The world needs a Python version of Archive::Extract, and we want you to write it!

Upvotes: 1

Mark Byers
Mark Byers

Reputation: 838346

In Python you can use:

I'm not aware of any wrapper that can choose the right format automatically. If it exists it doesn't seem to be mentioned in the documentation for any of the above modules.

Upvotes: 1

Related Questions