How to zip a folder and file in python?

后端 未结 3 1780
情深已故
情深已故 2021-01-12 05:04

I\'ve got a folder called: \'files\' which contains lots of jpg photographs. I\'ve also got a file called \'temp.kml\'. I want to create a KMZ file (basically a zip file) wh

3条回答
  •  囚心锁ツ
    2021-01-12 05:12

    You can use shutil

    import shutil
    
    shutil.make_archive("simonsZip", "zip", "files")
    

提交回复
热议问题