code: def add_contents_to_zip(zip_file, path):
      
      path = path.rstrip(os.sep)
      with zipfile.ZipFile(zip_file, 'a') as zf:
          for root, dirs, files in os.walk(path):
              for file in files:
                  file_path = os.path.join(root, file)
                  zf.write(file_path, file_path[len(path)+1:])
docs: Zip the contents of <path> into <zip_file>.
      :param str|unicode zip_file: The file name of the zip file
      :param str|unicode path: Full path of the directory to zip up