python how to zip a file to linux code example Example: zip a directory in python shutil.make_archive(output_filename, 'zip', dir_name)