def get_zip_class():
class ContextualZipFile(zipfile.ZipFile):<EOL><INDENT>def __enter__(self):<EOL><INDENT>return self<EOL><DEDENT>def __exit__(self, type, value, traceback):<EOL><INDENT>self.close<EOL><DEDENT><DEDENT>return zipfile.ZipFile if hasattr(zipfile.ZipFile, '<STR_LIT>') elseContextualZipFile<EOL>
Supplement ZipFile class to support context manager for Python 2.6