#NEWLINE# def _get_zip_item_content( path_to_zip , resource , return_binary , encoding ) : #NEWLINE# #INDENT# if ( not os . path . exists ( path_to_zip ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# ret_value = None #NEWLINE# with zipfile . ZipFile ( path_to_zip ) as zip_file : #NEWLINE# #INDENT# namelist = zip_file . namelist ( ) #NEWLINE# if ( resource in namelist ) : #NEWLINE# #INDENT# ret_value = zip_file . read ( resource ) #NEWLINE# if ( not zip_file ) : #NEWLINE# #INDENT# ret_value = ret_value . decode ( encoding ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ret_value