#NEWLINE# def JarContents( jar_path ) : #NEWLINE# #INDENT# "Generates (name, contents) pairs for the given jar.\n\n  Each generated tuple consists of the relative name within the jar of an entry,\n  for example 'java/lang/Object.class', and a str that is the corresponding\n  contents.\n\n  Args:\n    jar_path: a str that is the path to the jar.\n\n  Yields:\n    A (name, contents) pair.\n  " #NEWLINE# with zipfile . ZipFile ( jar_path ) as jar : #NEWLINE# #INDENT# for name in jar . namelist ( ) : #NEWLINE# #INDENT# ( yield ( name , jar . read ( name ) ) )