How to zip folders with python? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to zip folders with python?

There is a code https://code.sololearn.com/cwzaU0RRjcXu. It does not work with folder names, which contains space. source = ['D:\\123','D:\\456','"D:\\123 456"'] If i remove ,'"D:\\123 456"' then everything works good. What wrong?

17th May 2020, 6:03 PM
Š”трŠ¾Š¼ŠŗŠ¾Š² Š”ŠµŃ€Š³ŠµŠ¹
Š”трŠ¾Š¼ŠŗŠ¾Š² Š”ŠµŃ€Š³ŠµŠ¹ - avatar
1 Resposta
+ 2
You can use import zipfile, and then the mehods provided from this module. To get details about this module see: https://docs.python.org/3.7/library/zipfile.html
17th May 2020, 6:38 PM
Lothar
Lothar - avatar