code: def make_zip(folder_path, output_filename):
      
      cwd = os.getcwd()
  
      # 获取需要打包的文件列表
      file_lists = []
      for root, dirs, files in os.walk(folder_path):
          for file in files:
              file_1 = os.path.join(root, file).replace(folder_path + '/', '')
              if 'zip' not in file_1:
                  file_lists.append(file_1)
  
      # 将文件列表打包成zip
      os.chdir(folder_path)
      with zipfile.ZipFile(output_filename, 'w') as myzip:
          for file in file_lists:
              myzip.write(file)
  
      # 将工作目录切换回原始
      os.chdir(cwd)
docs: 将目录中除zip之外的文件打包成zip文件(包括子文件夹)
      空文件夹不会被打包
  
      example
      ----------------
      make_zip('results','zips//招标信息结果_2017-05-09.zip')