Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read content of RAR file into memory in Python

I'm looking for a way to read specific files from a rar archive into memory. Specifically they are a collection of numbered image files (I'm writing a comic reader). While I can simply unrar these files and load them as needed (deleting them when done), I'd prefer to avoid that if possible.

That all said, I'd prefer a solution that's cross platform (Windows/Linux) if possible, but Linux is a must. Just as importantly, if you're going to point out a library to handle this for me, please understand that it must be free (as in beer) or OSS.

like image 984
Brent Taylor Avatar asked Jul 27 '09 00:07

Brent Taylor


1 Answers

See the rarfile module:

  • http://grue.l-t.ee/~marko/src/rarfile/README.html
  • http://pypi.python.org/pypi/rarfile/
  • https://github.com/markokr/rarfile
like image 81
ars Avatar answered Sep 20 '22 19:09

ars