From 578135a71cb265d33a2088c5d2a35e5d897376e2 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 28 Sep 2006 07:35:48 +0000 Subject: [PATCH] * we should read a file without extracting it to somewhere --- pisi/archive.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pisi/archive.py b/pisi/archive.py index d59c612c..39e5c777 100644 --- a/pisi/archive.py +++ b/pisi/archive.py @@ -308,6 +308,9 @@ class ArchiveZip(ArchiveBase): """ Returns true if file_path is member of the zip archive""" return file_path in self.zip_obj.namelist() + def read_file(self, file_path): + return self.zip_obj.read(file_path) + def unpack_file_cond(self, pred, target_dir, archive_root = ''): """Unpack/Extract files according to predicate function pred: filename -> bool