def CopyFileInZip(from_zip, from_name, to_zip, to_name=None, signer=None):
 data = from_zip.read(from_name)
 if (to_name is None):
  to_name = from_name
 if signer:
  logging.debug('Signing %s', from_name)
  data = signer.SignBuffer(data)
 to_zip.writestr(to_name, data)

def CopyFileInZip ( from_zip , from_name , to_zip , to_name = None , signer = None ) : data = from_zip . read ( from_name ) if ( to_name is None ) : to_name = from_name if signer : logging . debug ( 'Signing %s' , from_name ) data = signer . SignBuffer ( data ) to_zip . writestr ( to_name , data )
read a file from a zipfile and write it to a new zipfile .