Did I find the right examples for you? yes no

All Samples(3)  |  Call(1)  |  Derive(0)  |  Import(2)

        def restore_archive(archive, path, cert, folder, tmpdir, cb=None):
    cipher = get_cipher(archive, cert)
    with open(path, 'rb') as infile:
        with NamedTemporaryFile() as dst:
            with CryptIO(infile, cipher) as cf:
                copyfileobj(cf, dst)
            dst.flush()
            dst.seek(0)
            with ZipFile(dst) as zf:
                map(cb,
                    map(lambda zi: zf.extract(zi, folder), zf.infolist()))
        


src/l/o/longaccess-client-HEAD/lacli/archive/__init__.py   longaccess-client(Download)
from lacore.adf.persist import make_adf
from lacore.archive import restore_archive as _restore_archive
from lacli.nice import with_low_priority
from lacli.hash import HashIO
 

src/l/a/lacore-0.1.3/lacore/t/test_archive.py   lacore(Download)
    def test_restore(self):
        from lacore.archive import restore_archive
        from lacore.adf.persist import load_archive
        with _temp_home() as tmpdir:
            cb = Mock()
                cert = load_archive(cf)
            restore_archive(
                cert['archive'], cfname, cert['cert'], tmpdir, tmpdir, cb)
            self.assertEqual(1, cb.call_count)
            self.assertTrue(os.path.exists(