def create_zipfile(directory, files, zipname='test'):
 zipfile_path = ((directory / zipname) + '.zip')
 with zipfile.ZipFile(str(zipfile_path), 'w') as new_zipfile:
  for file_path in files:
   new_zipfile.write(str(file_path), arcname=os.path.basename(str(file_path)))
 return str(zipfile_path)

def create_zipfile ( directory , files , zipname = 'test' ) : zipfile_path = ( ( directory / zipname ) + '.zip' ) with zipfile . ZipFile ( str ( zipfile_path ) , 'w' ) as new_zipfile : for file_path in files : new_zipfile . write ( str ( file_path ) , arcname = os . path . basename ( str ( file_path ) ) ) return str ( zipfile_path )
return a path to a newly created zip file .