Extract files with invalid characters in filename with Python

后端 未结 3 1244
你的背包
你的背包 2021-01-06 03:50

I use python\'s zipfile module to extract a .zip archive (Let\'s take this file at http://img.dafont.com/dl/?f=akvaleir for example.)

f = zipfile.ZipFile(\'a         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-06 04:42

    Instead of the extract method, use the open method and save the resulting pseudofile to disk under whatever name you wish, for example with shutil.copyfileobj.

提交回复
热议问题